{"action":"created","issue":{"url":"https://api.github.com/repos/kripken/emscripten/issues/4209","repository_url":"https://api.github.com/repos/kripken/emscripten","labels_url":"https://api.github.com/repos/kripken/emscripten/issues/4209/labels{/name}","comments_url":"https://api.github.com/repos/kripken/emscripten/issues/4209/comments","events_url":"https://api.github.com/repos/kripken/emscripten/issues/4209/events","html_url":"https://github.com/kripken/emscripten/pull/4209","id":144371793,"number":4209,"title":"Optimize emscripten_get_now","user":{"login":"kripken","id":173661,"avatar_url":"https://avatars.githubusercontent.com/u/173661?v=3","gravatar_id":"","url":"https://api.github.com/users/kripken","html_url":"https://github.com/kripken","followers_url":"https://api.github.com/users/kripken/followers","following_url":"https://api.github.com/users/kripken/following{/other_user}","gists_url":"https://api.github.com/users/kripken/gists{/gist_id}","starred_url":"https://api.github.com/users/kripken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kripken/subscriptions","organizations_url":"https://api.github.com/users/kripken/orgs","repos_url":"https://api.github.com/users/kripken/repos","events_url":"https://api.github.com/users/kripken/events{/privacy}","received_events_url":"https://api.github.com/users/kripken/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-29T20:05:21Z","updated_at":"2016-03-29T23:22:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kripken/emscripten/pulls/4209","html_url":"https://github.com/kripken/emscripten/pull/4209","diff_url":"https://github.com/kripken/emscripten/pull/4209.diff","patch_url":"https://github.com/kripken/emscripten/pull/4209.patch"},"body":"These two commits optimize by first doing the function selection at startup, and then by using `.bind()` to avoid an indirection function.\r\n\r\nI seem to see a small slowdown in the shell, and maybe a tiny speedup in the browser, but not sure. @juj, maybe you can benchmark too? I just did a loop over a few hundred thousand calls to that method, maybe there's a better way? If this isn't actually faster, not sure it's worth it."},"comment":{"url":"https://api.github.com/repos/kripken/emscripten/issues/comments/203155169","html_url":"https://github.com/kripken/emscripten/pull/4209#issuecomment-203155169","issue_url":"https://api.github.com/repos/kripken/emscripten/issues/4209","id":203155169,"user":{"login":"juj","id":225351,"avatar_url":"https://avatars.githubusercontent.com/u/225351?v=3","gravatar_id":"","url":"https://api.github.com/users/juj","html_url":"https://github.com/juj","followers_url":"https://api.github.com/users/juj/followers","following_url":"https://api.github.com/users/juj/following{/other_user}","gists_url":"https://api.github.com/users/juj/gists{/gist_id}","starred_url":"https://api.github.com/users/juj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juj/subscriptions","organizations_url":"https://api.github.com/users/juj/orgs","repos_url":"https://api.github.com/users/juj/repos","events_url":"https://api.github.com/users/juj/events{/privacy}","received_events_url":"https://api.github.com/users/juj/received_events","type":"User","site_admin":false},"created_at":"2016-03-29T23:22:37Z","updated_at":"2016-03-29T23:22:37Z","body":"Yeah, that sound good. Though can you leave the functions unnamed, i.e. `function() { ... }` instead of `function _emscripten_get_now_actual() { ... }`, since that helps keep the captured profiles read clean and not have two layer `_emscripten_get_now` -> `_emscripten_get_now_actual` show up."}}