{"action":"created","comment":{"url":"https://api.github.com/repos/nodejs/node/pulls/comments/96897688","pull_request_review_id":17495239,"id":96897688,"diff_hunk":"@@ -164,20 +174,20 @@ QueryString.escape = function(str) {\n   if (lastPos < str.length)\n     return out + str.slice(lastPos);\n   return out;\n-};\n+}\n \n-var stringifyPrimitive = function(v) {\n+function stringifyPrimitive(v) {\n   if (typeof v === 'string')\n     return v;\n   if (typeof v === 'number' && isFinite(v))\n     return '' + v;\n   if (typeof v === 'boolean')\n     return v ? 'true' : 'false';\n   return '';\n-};\n+}","path":"lib/querystring.js","position":73,"original_position":73,"commit_id":"0b9d55d6269e408ae0fcfba0c9d45b1d17bea437","original_commit_id":"0b9d55d6269e408ae0fcfba0c9d45b1d17bea437","user":{"login":"mscdex","id":54666,"avatar_url":"https://avatars.githubusercontent.com/u/54666?v=3","gravatar_id":"","url":"https://api.github.com/users/mscdex","html_url":"https://github.com/mscdex","followers_url":"https://api.github.com/users/mscdex/followers","following_url":"https://api.github.com/users/mscdex/following{/other_user}","gists_url":"https://api.github.com/users/mscdex/gists{/gist_id}","starred_url":"https://api.github.com/users/mscdex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mscdex/subscriptions","organizations_url":"https://api.github.com/users/mscdex/orgs","repos_url":"https://api.github.com/users/mscdex/repos","events_url":"https://api.github.com/users/mscdex/events{/privacy}","received_events_url":"https://api.github.com/users/mscdex/received_events","type":"User","site_admin":false},"body":"I dunno, I didn't do anything with this particular function. However, I remember we switched away from that type of usage (no pun intended) because V8 optimizes `typeof xx === yyy` statements. Before we switched to separate `if` statements, [the code was storing the result of `typeof`](https://github.com/nodejs/node/commit/85a92a37ef76059a4733c8e9462ff8da733dfb9e) and that was causing a performance degredation. I suspect `switch(typeof v)` might have the same effect.","created_at":"2017-01-19T16:25:16Z","updated_at":"2017-01-19T16:25:16Z","html_url":"https://github.com/nodejs/node/pull/10874#discussion_r96897688","pull_request_url":"https://api.github.com/repos/nodejs/node/pulls/10874","_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments/96897688"},"html":{"href":"https://github.com/nodejs/node/pull/10874#discussion_r96897688"},"pull_request":{"href":"https://api.github.com/repos/nodejs/node/pulls/10874"}}},"pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/10874","id":102120029,"html_url":"https://github.com/nodejs/node/pull/10874","diff_url":"https://github.com/nodejs/node/pull/10874.diff","patch_url":"https://github.com/nodejs/node/pull/10874.patch","issue_url":"https://api.github.com/repos/nodejs/node/issues/10874","number":10874,"state":"open","locked":false,"title":"querystring: improve parse() performance","user":{"login":"mscdex","id":54666,"avatar_url":"https://avatars.githubusercontent.com/u/54666?v=3","gravatar_id":"","url":"https://api.github.com/users/mscdex","html_url":"https://github.com/mscdex","followers_url":"https://api.github.com/users/mscdex/followers","following_url":"https://api.github.com/users/mscdex/following{/other_user}","gists_url":"https://api.github.com/users/mscdex/gists{/gist_id}","starred_url":"https://api.github.com/users/mscdex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mscdex/subscriptions","organizations_url":"https://api.github.com/users/mscdex/orgs","repos_url":"https://api.github.com/users/mscdex/repos","events_url":"https://api.github.com/users/mscdex/events{/privacy}","received_events_url":"https://api.github.com/users/mscdex/received_events","type":"User","site_admin":false},"body":"Here are the results with existing benchmarks (and newly added input/type) for the changes in this PR:\r\n\r\n```\r\n                                                                  improvement confidence      p.value\r\n querystring/querystring-parse.js n=5000000 type=\"encodefake\"          7.60 %        *** 5.588287e-48\r\n querystring/querystring-parse.js n=5000000 type=\"encodelast\"         23.85 %        *** 3.772582e-43\r\n querystring/querystring-parse.js n=5000000 type=\"encodemany\"         13.75 %        *** 7.027748e-27\r\n querystring/querystring-parse.js n=5000000 type=\"manypairs\"           7.09 %        *** 2.271675e-49\r\n querystring/querystring-parse.js n=5000000 type=\"multicharsep\"       19.71 %        *** 6.757215e-33\r\n querystring/querystring-parse.js n=5000000 type=\"multivalue\"         37.01 %        *** 4.461087e-58\r\n querystring/querystring-parse.js n=5000000 type=\"multivaluemany\"     33.38 %        *** 4.410104e-59\r\n querystring/querystring-parse.js n=5000000 type=\"noencode\"           27.66 %        *** 8.234363e-41\r\n```\r\n\r\nCI: https://ci.nodejs.org/job/node-test-pull-request/5932/\r\n\r\n##### Checklist\r\n<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->\r\n\r\n- [X] `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes\r\n- [X] tests and/or benchmarks are included\r\n- [X] commit message follows commit guidelines\r\n\r\n##### Affected core subsystem(s)\r\n\r\n* querystring\r\n","created_at":"2017-01-18T18:12:19Z","updated_at":"2017-01-19T16:25:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"30e929e25fd251a741bc05c36a10854cecd6b0db","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/nodejs/node/pulls/10874/commits","review_comments_url":"https://api.github.com/repos/nodejs/node/pulls/10874/comments","review_comment_url":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nodejs/node/issues/10874/comments","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/0b9d55d6269e408ae0fcfba0c9d45b1d17bea437","head":{"label":"mscdex:querystring-parse-perf","ref":"querystring-parse-perf","sha":"0b9d55d6269e408ae0fcfba0c9d45b1d17bea437","user":{"login":"mscdex","id":54666,"avatar_url":"https://avatars.githubusercontent.com/u/54666?v=3","gravatar_id":"","url":"https://api.github.com/users/mscdex","html_url":"https://github.com/mscdex","followers_url":"https://api.github.com/users/mscdex/followers","following_url":"https://api.github.com/users/mscdex/following{/other_user}","gists_url":"https://api.github.com/users/mscdex/gists{/gist_id}","starred_url":"https://api.github.com/users/mscdex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mscdex/subscriptions","organizations_url":"https://api.github.com/users/mscdex/orgs","repos_url":"https://api.github.com/users/mscdex/repos","events_url":"https://api.github.com/users/mscdex/events{/privacy}","received_events_url":"https://api.github.com/users/mscdex/received_events","type":"User","site_admin":false},"repo":{"id":29220048,"name":"io.js","full_name":"mscdex/io.js","owner":{"login":"mscdex","id":54666,"avatar_url":"https://avatars.githubusercontent.com/u/54666?v=3","gravatar_id":"","url":"https://api.github.com/users/mscdex","html_url":"https://github.com/mscdex","followers_url":"https://api.github.com/users/mscdex/followers","following_url":"https://api.github.com/users/mscdex/following{/other_user}","gists_url":"https://api.github.com/users/mscdex/gists{/gist_id}","starred_url":"https://api.github.com/users/mscdex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mscdex/subscriptions","organizations_url":"https://api.github.com/users/mscdex/orgs","repos_url":"https://api.github.com/users/mscdex/repos","events_url":"https://api.github.com/users/mscdex/events{/privacy}","received_events_url":"https://api.github.com/users/mscdex/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mscdex/io.js","description":"A spork of Node.js with an open governance model","fork":true,"url":"https://api.github.com/repos/mscdex/io.js","forks_url":"https://api.github.com/repos/mscdex/io.js/forks","keys_url":"https://api.github.com/repos/mscdex/io.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mscdex/io.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mscdex/io.js/teams","hooks_url":"https://api.github.com/repos/mscdex/io.js/hooks","issue_events_url":"https://api.github.com/repos/mscdex/io.js/issues/events{/number}","events_url":"https://api.github.com/repos/mscdex/io.js/events","assignees_url":"https://api.github.com/repos/mscdex/io.js/assignees{/user}","branches_url":"https://api.github.com/repos/mscdex/io.js/branches{/branch}","tags_url":"https://api.github.com/repos/mscdex/io.js/tags","blobs_url":"https://api.github.com/repos/mscdex/io.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mscdex/io.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mscdex/io.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/mscdex/io.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mscdex/io.js/statuses/{sha}","languages_url":"https://api.github.com/repos/mscdex/io.js/languages","stargazers_url":"https://api.github.com/repos/mscdex/io.js/stargazers","contributors_url":"https://api.github.com/repos/mscdex/io.js/contributors","subscribers_url":"https://api.github.com/repos/mscdex/io.js/subscribers","subscription_url":"https://api.github.com/repos/mscdex/io.js/subscription","commits_url":"https://api.github.com/repos/mscdex/io.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/mscdex/io.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/mscdex/io.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/mscdex/io.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/mscdex/io.js/contents/{+path}","compare_url":"https://api.github.com/repos/mscdex/io.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mscdex/io.js/merges","archive_url":"https://api.github.com/repos/mscdex/io.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mscdex/io.js/downloads","issues_url":"https://api.github.com/repos/mscdex/io.js/issues{/number}","pulls_url":"https://api.github.com/repos/mscdex/io.js/pulls{/number}","milestones_url":"https://api.github.com/repos/mscdex/io.js/milestones{/number}","notifications_url":"https://api.github.com/repos/mscdex/io.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mscdex/io.js/labels{/name}","releases_url":"https://api.github.com/repos/mscdex/io.js/releases{/id}","deployments_url":"https://api.github.com/repos/mscdex/io.js/deployments","created_at":"2015-01-14T01:01:23Z","updated_at":"2016-04-29T10:58:15Z","pushed_at":"2017-01-19T08:26:53Z","git_url":"git://github.com/mscdex/io.js.git","ssh_url":"git@github.com:mscdex/io.js.git","clone_url":"https://github.com/mscdex/io.js.git","svn_url":"https://github.com/mscdex/io.js","homepage":"","size":240295,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"js-dns-resolver"}},"base":{"label":"nodejs:master","ref":"master","sha":"762f260c4dacfcf3ac7b4609cb052b5d6ef2a345","user":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars.githubusercontent.com/u/9950313?v=3","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"repo":{"id":27193779,"name":"node","full_name":"nodejs/node","owner":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars.githubusercontent.com/u/9950313?v=3","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nodejs/node","description":"Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:","fork":false,"url":"https://api.github.com/repos/nodejs/node","forks_url":"https://api.github.com/repos/nodejs/node/forks","keys_url":"https://api.github.com/repos/nodejs/node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nodejs/node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nodejs/node/teams","hooks_url":"https://api.github.com/repos/nodejs/node/hooks","issue_events_url":"https://api.github.com/repos/nodejs/node/issues/events{/number}","events_url":"https://api.github.com/repos/nodejs/node/events","assignees_url":"https://api.github.com/repos/nodejs/node/assignees{/user}","branches_url":"https://api.github.com/repos/nodejs/node/branches{/branch}","tags_url":"https://api.github.com/repos/nodejs/node/tags","blobs_url":"https://api.github.com/repos/nodejs/node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nodejs/node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nodejs/node/git/refs{/sha}","trees_url":"https://api.github.com/repos/nodejs/node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/{sha}","languages_url":"https://api.github.com/repos/nodejs/node/languages","stargazers_url":"https://api.github.com/repos/nodejs/node/stargazers","contributors_url":"https://api.github.com/repos/nodejs/node/contributors","subscribers_url":"https://api.github.com/repos/nodejs/node/subscribers","subscription_url":"https://api.github.com/repos/nodejs/node/subscription","commits_url":"https://api.github.com/repos/nodejs/node/commits{/sha}","git_commits_url":"https://api.github.com/repos/nodejs/node/git/commits{/sha}","comments_url":"https://api.github.com/repos/nodejs/node/comments{/number}","issue_comment_url":"https://api.github.com/repos/nodejs/node/issues/comments{/number}","contents_url":"https://api.github.com/repos/nodejs/node/contents/{+path}","compare_url":"https://api.github.com/repos/nodejs/node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nodejs/node/merges","archive_url":"https://api.github.com/repos/nodejs/node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nodejs/node/downloads","issues_url":"https://api.github.com/repos/nodejs/node/issues{/number}","pulls_url":"https://api.github.com/repos/nodejs/node/pulls{/number}","milestones_url":"https://api.github.com/repos/nodejs/node/milestones{/number}","notifications_url":"https://api.github.com/repos/nodejs/node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nodejs/node/labels{/name}","releases_url":"https://api.github.com/repos/nodejs/node/releases{/id}","deployments_url":"https://api.github.com/repos/nodejs/node/deployments","created_at":"2014-11-26T19:57:11Z","updated_at":"2017-01-19T16:24:13Z","pushed_at":"2017-01-19T15:47:26Z","git_url":"git://github.com/nodejs/node.git","ssh_url":"git@github.com:nodejs/node.git","clone_url":"https://github.com/nodejs/node.git","svn_url":"https://github.com/nodejs/node","homepage":"https://nodejs.org","size":255397,"stargazers_count":30800,"watchers_count":30800,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5636,"mirror_url":null,"open_issues_count":1017,"forks":5636,"open_issues":1017,"watchers":30800,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/10874"},"html":{"href":"https://github.com/nodejs/node/pull/10874"},"issue":{"href":"https://api.github.com/repos/nodejs/node/issues/10874"},"comments":{"href":"https://api.github.com/repos/nodejs/node/issues/10874/comments"},"review_comments":{"href":"https://api.github.com/repos/nodejs/node/pulls/10874/comments"},"review_comment":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nodejs/node/pulls/10874/commits"},"statuses":{"href":"https://api.github.com/repos/nodejs/node/statuses/0b9d55d6269e408ae0fcfba0c9d45b1d17bea437"}}}}
{"actor":{"display_login":"mscdex"}}