{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/5650","repository_url":"https://api.github.com/repos/nodejs/node","labels_url":"https://api.github.com/repos/nodejs/node/issues/5650/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/5650/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/5650/events","html_url":"https://github.com/nodejs/node/pull/5650","id":140043381,"number":5650,"title":"[querystring] avoid Object.prototype conflicts including `__proto__`","user":{"login":"WebReflection","id":85749,"avatar_url":"https://avatars.githubusercontent.com/u/85749?v=3","gravatar_id":"","url":"https://api.github.com/users/WebReflection","html_url":"https://github.com/WebReflection","followers_url":"https://api.github.com/users/WebReflection/followers","following_url":"https://api.github.com/users/WebReflection/following{/other_user}","gists_url":"https://api.github.com/users/WebReflection/gists{/gist_id}","starred_url":"https://api.github.com/users/WebReflection/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WebReflection/subscriptions","organizations_url":"https://api.github.com/users/WebReflection/orgs","repos_url":"https://api.github.com/users/WebReflection/repos","events_url":"https://api.github.com/users/WebReflection/events{/privacy}","received_events_url":"https://api.github.com/users/WebReflection/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nodejs/node/labels/querystring","name":"querystring","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-10T23:51:09Z","updated_at":"2016-03-11T00:22:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/5650","html_url":"https://github.com/nodejs/node/pull/5650","diff_url":"https://github.com/nodejs/node/pull/5650.diff","patch_url":"https://github.com/nodejs/node/pull/5650.patch"},"body":"In order to solve https://github.com/nodejs/node/issues/5642 , keeping an eye and actually most likely improving performance for https://github.com/nodejs/node/issues/728 , this PR is meant to show a better way to deal with inheritance.\r\n\r\nMostly all problems would be solved using `const obj = Object.create(null);` instead of `const obj = {};` on top, but we all know that's going to break around more code than it will solve.\r\n\r\nThis PR is one option, the alternative is to grab, each time, at runtime, `Object.getOwnPropertyNames(Object.prototype)` and use **double `indexOf`** per each key, one for the known keys in object, one for the known keys in its prototype in case keys in object aren't known.\r\n\r\nAs most common CS related problem say, \"hashes\" are faster than `O(N*?)` searches in an array and this is the reason I've proposed a solution based on `in` operator first, but we know JS hases aren't even close to be comparable to structs or heap operations."},"comment":{"url":"https://api.github.com/repos/nodejs/node/issues/comments/195113886","html_url":"https://github.com/nodejs/node/pull/5650#issuecomment-195113886","issue_url":"https://api.github.com/repos/nodejs/node/issues/5650","id":195113886,"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},"created_at":"2016-03-11T00:22:13Z","updated_at":"2016-03-11T00:22:13Z","body":"I would like to see benchmark results before and after this change."}}