{"action":"created","issue":{"url":"https://api.github.com/repos/svaarala/duktape/issues/139","labels_url":"https://api.github.com/repos/svaarala/duktape/issues/139/labels{/name}","comments_url":"https://api.github.com/repos/svaarala/duktape/issues/139/comments","events_url":"https://api.github.com/repos/svaarala/duktape/issues/139/events","html_url":"https://github.com/svaarala/duktape/issues/139","id":62849003,"number":139,"title":"Second round of performance improvements","user":{"login":"svaarala","id":6377415,"avatar_url":"https://avatars.githubusercontent.com/u/6377415?v=3","gravatar_id":"","url":"https://api.github.com/users/svaarala","html_url":"https://github.com/svaarala","followers_url":"https://api.github.com/users/svaarala/followers","following_url":"https://api.github.com/users/svaarala/following{/other_user}","gists_url":"https://api.github.com/users/svaarala/gists{/gist_id}","starred_url":"https://api.github.com/users/svaarala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svaarala/subscriptions","organizations_url":"https://api.github.com/users/svaarala/orgs","repos_url":"https://api.github.com/users/svaarala/repos","events_url":"https://api.github.com/users/svaarala/events{/privacy}","received_events_url":"https://api.github.com/users/svaarala/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/svaarala/duktape/labels/performance","name":"performance","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/svaarala/duktape/milestones/9","html_url":"https://github.com/svaarala/duktape/milestones/v1.3.0","labels_url":"https://api.github.com/repos/svaarala/duktape/milestones/9/labels","id":1037290,"number":9,"title":"v1.3.0","description":"","creator":{"login":"svaarala","id":6377415,"avatar_url":"https://avatars.githubusercontent.com/u/6377415?v=3","gravatar_id":"","url":"https://api.github.com/users/svaarala","html_url":"https://github.com/svaarala","followers_url":"https://api.github.com/users/svaarala/followers","following_url":"https://api.github.com/users/svaarala/following{/other_user}","gists_url":"https://api.github.com/users/svaarala/gists{/gist_id}","starred_url":"https://api.github.com/users/svaarala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svaarala/subscriptions","organizations_url":"https://api.github.com/users/svaarala/orgs","repos_url":"https://api.github.com/users/svaarala/repos","events_url":"https://api.github.com/users/svaarala/events{/privacy}","received_events_url":"https://api.github.com/users/svaarala/received_events","type":"User","site_admin":false},"open_issues":42,"closed_issues":12,"state":"open","created_at":"2015-03-24T22:16:58Z","updated_at":"2015-05-31T02:08:30Z","due_on":null,"closed_at":null},"comments":11,"created_at":"2015-03-19T02:06:31Z","updated_at":"2015-05-31T02:23:54Z","closed_at":null,"body":"- [ ] Optimize string intern \"compute UTF-8 character length\" algorithm which is a major string performance bottleneck\r\n- [ ] Improve string hashing performance by using a much more sparsely sampled hash\r\n- [ ] JSON.stringify() optimization to look into object contents directly instead of using the ordinary stack API #204\r\n- [ ] Avoid current activation lookup in bytecode execution loop by using a current bytecode pointer in a stable place (e.g. `thr->curr_pc`)\r\n- [x] Add basic compile perftest cases\r\n- [ ] Avoid creating an explicit environment object for function self reference\r\n- [ ] Lexer tokenization improvements\r\n- [ ] Compiler bytecode emit improvements"},"comment":{"url":"https://api.github.com/repos/svaarala/duktape/issues/comments/107112052","html_url":"https://github.com/svaarala/duktape/issues/139#issuecomment-107112052","issue_url":"https://api.github.com/repos/svaarala/duktape/issues/139","id":107112052,"user":{"login":"svaarala","id":6377415,"avatar_url":"https://avatars.githubusercontent.com/u/6377415?v=3","gravatar_id":"","url":"https://api.github.com/users/svaarala","html_url":"https://github.com/svaarala","followers_url":"https://api.github.com/users/svaarala/followers","following_url":"https://api.github.com/users/svaarala/following{/other_user}","gists_url":"https://api.github.com/users/svaarala/gists{/gist_id}","starred_url":"https://api.github.com/users/svaarala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svaarala/subscriptions","organizations_url":"https://api.github.com/users/svaarala/orgs","repos_url":"https://api.github.com/users/svaarala/repos","events_url":"https://api.github.com/users/svaarala/events{/privacy}","received_events_url":"https://api.github.com/users/svaarala/received_events","type":"User","site_admin":false},"created_at":"2015-05-31T02:23:54Z","updated_at":"2015-05-31T02:23:54Z","body":"@fatcerberus I wouldn't think so - the number of cycles taken to render a character would probably be orders of magnitude larger than the UTF-8 length computation. The \"botteleneck\" is a bit misleading because we're talking about micro-benchmarks here :)\r\n\r\nAlso, the character length computation only happens when new strings are introduced. For example, all constant strings in a function are interned at compile time and there's no runtime cost for precomputing their UTF-8 length.\r\n"}}