{"action":"created","issue":{"url":"https://api.github.com/repos/cappuccino/cappuccino/issues/2384","labels_url":"https://api.github.com/repos/cappuccino/cappuccino/issues/2384/labels{/name}","comments_url":"https://api.github.com/repos/cappuccino/cappuccino/issues/2384/comments","events_url":"https://api.github.com/repos/cappuccino/cappuccino/issues/2384/events","html_url":"https://github.com/cappuccino/cappuccino/pull/2384","id":109995025,"number":2384,"title":"Speedup of the Cappuccino framework by more efficient objj_msgSend","user":{"login":"mrcarlberg","id":1597264,"avatar_url":"https://avatars.githubusercontent.com/u/1597264?v=3","gravatar_id":"","url":"https://api.github.com/users/mrcarlberg","html_url":"https://github.com/mrcarlberg","followers_url":"https://api.github.com/users/mrcarlberg/followers","following_url":"https://api.github.com/users/mrcarlberg/following{/other_user}","gists_url":"https://api.github.com/users/mrcarlberg/gists{/gist_id}","starred_url":"https://api.github.com/users/mrcarlberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrcarlberg/subscriptions","organizations_url":"https://api.github.com/users/mrcarlberg/orgs","repos_url":"https://api.github.com/users/mrcarlberg/repos","events_url":"https://api.github.com/users/mrcarlberg/events{/privacy}","received_events_url":"https://api.github.com/users/mrcarlberg/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cappuccino/cappuccino/labels/%23accepted","name":"#accepted","color":"f4d372"},{"url":"https://api.github.com/repos/cappuccino/cappuccino/labels/Objective-J","name":"Objective-J","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cappuccino/cappuccino/milestones/4","html_url":"https://github.com/cappuccino/cappuccino/milestones/Someday","labels_url":"https://api.github.com/repos/cappuccino/cappuccino/milestones/4/labels","id":107283,"number":4,"title":"Someday","description":"","creator":{"login":"aparajita","id":22218,"avatar_url":"https://avatars.githubusercontent.com/u/22218?v=3","gravatar_id":"","url":"https://api.github.com/users/aparajita","html_url":"https://github.com/aparajita","followers_url":"https://api.github.com/users/aparajita/followers","following_url":"https://api.github.com/users/aparajita/following{/other_user}","gists_url":"https://api.github.com/users/aparajita/gists{/gist_id}","starred_url":"https://api.github.com/users/aparajita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aparajita/subscriptions","organizations_url":"https://api.github.com/users/aparajita/orgs","repos_url":"https://api.github.com/users/aparajita/repos","events_url":"https://api.github.com/users/aparajita/events{/privacy}","received_events_url":"https://api.github.com/users/aparajita/received_events","type":"User","site_admin":false},"open_issues":86,"closed_issues":982,"state":"open","created_at":"2012-04-12T21:50:28Z","updated_at":"2015-10-06T12:24:35Z","due_on":null,"closed_at":null},"comments":18,"created_at":"2015-10-06T12:11:50Z","updated_at":"2015-10-12T06:56:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cappuccino/cappuccino/pulls/2384","html_url":"https://github.com/cappuccino/cappuccino/pull/2384","diff_url":"https://github.com/cappuccino/cappuccino/pull/2384.diff","patch_url":"https://github.com/cappuccino/cappuccino/pull/2384.patch"},"body":"This pull request will make Objective-J run faster by implementing a more efficient ```objj_msgSend``` function and ```objj_method``` implementation. The compiler can also optionally inline the function to increase the speed even more.\r\n\r\nInitial tests show that the speed increase is more than 50% in special cases. For a general Objective-J application the speed increase is around 20%.\r\n\r\n# The speed increase is possible by the following improvements:\r\n1. More efficient ```objj_method``` implemention. That bad thing here is that the ```name``` property on ```objj_method``` has to change to ```method_name```.\r\n2. ```objj_msgSend``` and ```objj_msgSendSuper``` functions has a more efficient implementation.\r\n3. Array and Dictionary Literals generate more efficient code.\r\n4. The ```objj_msgSend``` and ```objj_msgSendSuper``` functions are optionally inlined by the compiler.\r\n\r\n# How to use:\r\n• To create a Cappuccino framework with inlined ```objj_msgSend``` and ```objj_msgSendSuper``` functions for the ```Release``` version just do ```jake install-inline``` instead of ```jake install``` when building the framework.\r\n• To generate inlined code when compiling in the browser add the below line in the ```index[-debug].html``` file.\r\n```\r\nObjectiveJ.setCurrentCompilerFlags(ObjectiveJ.ObjJAcornCompiler.Flags.IncludeDebugSymbols | ObjectiveJ.ObjJAcornCompiler.Flags.IncludeTypeSignatures | ObjectiveJ.ObjJAcornCompiler.Flags.InlineMsgSend);\r\n```\r\n• To generate inline code for the ```Release``` version when building from command line change ```task.setCompilerFlags(\"-O\");``` to ```task.setCompilerFlags(\"-O2\");``` in the project Jakefile. This is needed for all your subprojects and frameworks too.\r\n\r\nA new version of OJTest framework (https://github.com/cappuccino/OJTest) is needed to run the test cases. Copy it to the package folder in the Narwhal directory."},"comment":{"url":"https://api.github.com/repos/cappuccino/cappuccino/issues/comments/147303442","html_url":"https://github.com/cappuccino/cappuccino/pull/2384#issuecomment-147303442","issue_url":"https://api.github.com/repos/cappuccino/cappuccino/issues/2384","id":147303442,"user":{"login":"mrcarlberg","id":1597264,"avatar_url":"https://avatars.githubusercontent.com/u/1597264?v=3","gravatar_id":"","url":"https://api.github.com/users/mrcarlberg","html_url":"https://github.com/mrcarlberg","followers_url":"https://api.github.com/users/mrcarlberg/followers","following_url":"https://api.github.com/users/mrcarlberg/following{/other_user}","gists_url":"https://api.github.com/users/mrcarlberg/gists{/gist_id}","starred_url":"https://api.github.com/users/mrcarlberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrcarlberg/subscriptions","organizations_url":"https://api.github.com/users/mrcarlberg/orgs","repos_url":"https://api.github.com/users/mrcarlberg/repos","events_url":"https://api.github.com/users/mrcarlberg/events{/privacy}","received_events_url":"https://api.github.com/users/mrcarlberg/received_events","type":"User","site_admin":false},"created_at":"2015-10-12T06:56:13Z","updated_at":"2015-10-12T06:56:13Z","body":"The code size does increase:\r\n```Foundation```goes from 987,634 bytes to 1,151,583 bytes. (+17%)\r\n```AppKit```goes from 3,587,337 bytes to 4,343,767 bytes. (+21%)\r\nThis is not compressed and not zipped.\r\n\r\nI can't see any difference in memory usage in the Browser but as you say it should be a small increase."}}