{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/4678","repository_url":"https://api.github.com/repos/nodejs/node","labels_url":"https://api.github.com/repos/nodejs/node/issues/4678/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/4678/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/4678/events","html_url":"https://github.com/nodejs/node/pull/4678","id":126524763,"number":4678,"title":"util: Use of let and const. Optimized array use.","user":{"login":"danielsan","id":261488,"avatar_url":"https://avatars.githubusercontent.com/u/261488?v=3","gravatar_id":"","url":"https://api.github.com/users/danielsan","html_url":"https://github.com/danielsan","followers_url":"https://api.github.com/users/danielsan/followers","following_url":"https://api.github.com/users/danielsan/following{/other_user}","gists_url":"https://api.github.com/users/danielsan/gists{/gist_id}","starred_url":"https://api.github.com/users/danielsan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielsan/subscriptions","organizations_url":"https://api.github.com/users/danielsan/orgs","repos_url":"https://api.github.com/users/danielsan/repos","events_url":"https://api.github.com/users/danielsan/events{/privacy}","received_events_url":"https://api.github.com/users/danielsan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nodejs/node/labels/lts-watch-v4.x","name":"lts-watch-v4.x","color":"eb6420"},{"url":"https://api.github.com/repos/nodejs/node/labels/util","name":"util","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-01-13T21:53:43Z","updated_at":"2016-04-30T04:48:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/4678","html_url":"https://github.com/nodejs/node/pull/4678","diff_url":"https://github.com/nodejs/node/pull/4678.diff","patch_url":"https://github.com/nodejs/node/pull/4678.patch"},"body":"Because accessing properties is more expensive than accessing variables\r\nI moved the variables declared on lines 25 and 26 to lines 14 and 15.\r\nThus the previous piece of code can take advantage of those.\r\n\r\nThe push method is more expensive than array index attribution.\r\nSince the new array length is always known, the creation of the array\r\nwith a predefined length for future positioning attribution is less\r\nexpensive than using the push method."},"comment":{"url":"https://api.github.com/repos/nodejs/node/issues/comments/215937243","html_url":"https://github.com/nodejs/node/pull/4678#issuecomment-215937243","issue_url":"https://api.github.com/repos/nodejs/node/issues/4678","id":215937243,"user":{"login":"jasnell","id":439929,"avatar_url":"https://avatars.githubusercontent.com/u/439929?v=3","gravatar_id":"","url":"https://api.github.com/users/jasnell","html_url":"https://github.com/jasnell","followers_url":"https://api.github.com/users/jasnell/followers","following_url":"https://api.github.com/users/jasnell/following{/other_user}","gists_url":"https://api.github.com/users/jasnell/gists{/gist_id}","starred_url":"https://api.github.com/users/jasnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasnell/subscriptions","organizations_url":"https://api.github.com/users/jasnell/orgs","repos_url":"https://api.github.com/users/jasnell/repos","events_url":"https://api.github.com/users/jasnell/events{/privacy}","received_events_url":"https://api.github.com/users/jasnell/received_events","type":"User","site_admin":false},"created_at":"2016-04-30T04:48:00Z","updated_at":"2016-04-30T04:48:00Z","body":"@mscdex ... what do you think about this one? given the benchmarking you've done, is this PR something we'd want to avoid for now?"}}