{"action":"created","comment":{"url":"https://api.github.com/repos/jquery/sizzle/pulls/comments/135729241","pull_request_review_id":59171166,"id":135729241,"diff_hunk":"@@ -671,8 +671,10 @@ setDocument = Sizzle.setDocument = function( node ) {\n \n \t\t\t\t\t// Fall back on getElementsByName\n \t\t\t\t\telems = context.getElementsByName( id );\n+\t\t\t\t\tlength = elems.length;\n \t\t\t\t\ti = 0;","path":"dist/sizzle.js","position":23,"original_position":23,"commit_id":"88e5e6db8dc9e84836f7bb97ddfd20b8e67516a4","original_commit_id":"88e5e6db8dc9e84836f7bb97ddfd20b8e67516a4","user":{"login":"markelog","id":945528,"avatar_url":"https://avatars0.githubusercontent.com/u/945528?v=4","gravatar_id":"","url":"https://api.github.com/users/markelog","html_url":"https://github.com/markelog","followers_url":"https://api.github.com/users/markelog/followers","following_url":"https://api.github.com/users/markelog/following{/other_user}","gists_url":"https://api.github.com/users/markelog/gists{/gist_id}","starred_url":"https://api.github.com/users/markelog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markelog/subscriptions","organizations_url":"https://api.github.com/users/markelog/orgs","repos_url":"https://api.github.com/users/markelog/repos","events_url":"https://api.github.com/users/markelog/events{/privacy}","received_events_url":"https://api.github.com/users/markelog/received_events","type":"User","site_admin":false},"body":"This could moved to the body of a `for` right?","created_at":"2017-08-29T08:49:30Z","updated_at":"2017-08-29T08:51:47Z","html_url":"https://github.com/jquery/sizzle/pull/407#discussion_r135729241","pull_request_url":"https://api.github.com/repos/jquery/sizzle/pulls/407","_links":{"self":{"href":"https://api.github.com/repos/jquery/sizzle/pulls/comments/135729241"},"html":{"href":"https://github.com/jquery/sizzle/pull/407#discussion_r135729241"},"pull_request":{"href":"https://api.github.com/repos/jquery/sizzle/pulls/407"}}},"pull_request":{"url":"https://api.github.com/repos/jquery/sizzle/pulls/407","id":138112281,"html_url":"https://github.com/jquery/sizzle/pull/407","diff_url":"https://github.com/jquery/sizzle/pull/407.diff","patch_url":"https://github.com/jquery/sizzle/pull/407.patch","issue_url":"https://api.github.com/repos/jquery/sizzle/issues/407","number":407,"state":"open","locked":false,"title":"Avoid reading outside of collection bounds","user":{"login":"mathiasbynens","id":81942,"avatar_url":"https://avatars1.githubusercontent.com/u/81942?v=4","gravatar_id":"","url":"https://api.github.com/users/mathiasbynens","html_url":"https://github.com/mathiasbynens","followers_url":"https://api.github.com/users/mathiasbynens/followers","following_url":"https://api.github.com/users/mathiasbynens/following{/other_user}","gists_url":"https://api.github.com/users/mathiasbynens/gists{/gist_id}","starred_url":"https://api.github.com/users/mathiasbynens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathiasbynens/subscriptions","organizations_url":"https://api.github.com/users/mathiasbynens/orgs","repos_url":"https://api.github.com/users/mathiasbynens/repos","events_url":"https://api.github.com/users/mathiasbynens/events{/privacy}","received_events_url":"https://api.github.com/users/mathiasbynens/received_events","type":"User","site_admin":false},"body":"Consider the following collection:\r\n\r\n```js\r\nconst array = ['a', 'b', 'c'];\r\n```\r\n\r\nRetrieving `array[0]` can be done relatively quickly. However, when the property doesn’t exist on the receiver, JavaScript engines must continue to look up the prototype chain until either the property is found or the chain ends. This is inherently slower than *not* doing any prototype chain lookups. Retrieving an out-of-bounds index, e.g. `array[3]`, triggers this scenario, resulting in decreased performance.\r\n\r\nThis patch changes the way some loops are written to avoid running into the slow case unnecessarily.\r\n\r\n----\r\n\r\nSimilar patch for jQuery: https://github.com/jquery/jquery/pull/3769","created_at":"2017-08-29T07:56:55Z","updated_at":"2017-08-29T08:51:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bf1af3acf3243f0538ffc5d973d233ff78794d4d","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/jquery/sizzle/pulls/407/commits","review_comments_url":"https://api.github.com/repos/jquery/sizzle/pulls/407/comments","review_comment_url":"https://api.github.com/repos/jquery/sizzle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jquery/sizzle/issues/407/comments","statuses_url":"https://api.github.com/repos/jquery/sizzle/statuses/88e5e6db8dc9e84836f7bb97ddfd20b8e67516a4","head":{"label":"mathiasbynens:avoid-reading-past-end-of-array","ref":"avoid-reading-past-end-of-array","sha":"88e5e6db8dc9e84836f7bb97ddfd20b8e67516a4","user":{"login":"mathiasbynens","id":81942,"avatar_url":"https://avatars1.githubusercontent.com/u/81942?v=4","gravatar_id":"","url":"https://api.github.com/users/mathiasbynens","html_url":"https://github.com/mathiasbynens","followers_url":"https://api.github.com/users/mathiasbynens/followers","following_url":"https://api.github.com/users/mathiasbynens/following{/other_user}","gists_url":"https://api.github.com/users/mathiasbynens/gists{/gist_id}","starred_url":"https://api.github.com/users/mathiasbynens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathiasbynens/subscriptions","organizations_url":"https://api.github.com/users/mathiasbynens/orgs","repos_url":"https://api.github.com/users/mathiasbynens/repos","events_url":"https://api.github.com/users/mathiasbynens/events{/privacy}","received_events_url":"https://api.github.com/users/mathiasbynens/received_events","type":"User","site_admin":false},"repo":{"id":101730996,"name":"sizzle","full_name":"mathiasbynens/sizzle","owner":{"login":"mathiasbynens","id":81942,"avatar_url":"https://avatars1.githubusercontent.com/u/81942?v=4","gravatar_id":"","url":"https://api.github.com/users/mathiasbynens","html_url":"https://github.com/mathiasbynens","followers_url":"https://api.github.com/users/mathiasbynens/followers","following_url":"https://api.github.com/users/mathiasbynens/following{/other_user}","gists_url":"https://api.github.com/users/mathiasbynens/gists{/gist_id}","starred_url":"https://api.github.com/users/mathiasbynens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathiasbynens/subscriptions","organizations_url":"https://api.github.com/users/mathiasbynens/orgs","repos_url":"https://api.github.com/users/mathiasbynens/repos","events_url":"https://api.github.com/users/mathiasbynens/events{/privacy}","received_events_url":"https://api.github.com/users/mathiasbynens/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mathiasbynens/sizzle","description":"A sizzlin' hot selector engine.","fork":true,"url":"https://api.github.com/repos/mathiasbynens/sizzle","forks_url":"https://api.github.com/repos/mathiasbynens/sizzle/forks","keys_url":"https://api.github.com/repos/mathiasbynens/sizzle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mathiasbynens/sizzle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mathiasbynens/sizzle/teams","hooks_url":"https://api.github.com/repos/mathiasbynens/sizzle/hooks","issue_events_url":"https://api.github.com/repos/mathiasbynens/sizzle/issues/events{/number}","events_url":"https://api.github.com/repos/mathiasbynens/sizzle/events","assignees_url":"https://api.github.com/repos/mathiasbynens/sizzle/assignees{/user}","branches_url":"https://api.github.com/repos/mathiasbynens/sizzle/branches{/branch}","tags_url":"https://api.github.com/repos/mathiasbynens/sizzle/tags","blobs_url":"https://api.github.com/repos/mathiasbynens/sizzle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mathiasbynens/sizzle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mathiasbynens/sizzle/git/refs{/sha}","trees_url":"https://api.github.com/repos/mathiasbynens/sizzle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mathiasbynens/sizzle/statuses/{sha}","languages_url":"https://api.github.com/repos/mathiasbynens/sizzle/languages","stargazers_url":"https://api.github.com/repos/mathiasbynens/sizzle/stargazers","contributors_url":"https://api.github.com/repos/mathiasbynens/sizzle/contributors","subscribers_url":"https://api.github.com/repos/mathiasbynens/sizzle/subscribers","subscription_url":"https://api.github.com/repos/mathiasbynens/sizzle/subscription","commits_url":"https://api.github.com/repos/mathiasbynens/sizzle/commits{/sha}","git_commits_url":"https://api.github.com/repos/mathiasbynens/sizzle/git/commits{/sha}","comments_url":"https://api.github.com/repos/mathiasbynens/sizzle/comments{/number}","issue_comment_url":"https://api.github.com/repos/mathiasbynens/sizzle/issues/comments{/number}","contents_url":"https://api.github.com/repos/mathiasbynens/sizzle/contents/{+path}","compare_url":"https://api.github.com/repos/mathiasbynens/sizzle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mathiasbynens/sizzle/merges","archive_url":"https://api.github.com/repos/mathiasbynens/sizzle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mathiasbynens/sizzle/downloads","issues_url":"https://api.github.com/repos/mathiasbynens/sizzle/issues{/number}","pulls_url":"https://api.github.com/repos/mathiasbynens/sizzle/pulls{/number}","milestones_url":"https://api.github.com/repos/mathiasbynens/sizzle/milestones{/number}","notifications_url":"https://api.github.com/repos/mathiasbynens/sizzle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mathiasbynens/sizzle/labels{/name}","releases_url":"https://api.github.com/repos/mathiasbynens/sizzle/releases{/id}","deployments_url":"https://api.github.com/repos/mathiasbynens/sizzle/deployments","created_at":"2017-08-29T07:10:41Z","updated_at":"2017-08-29T07:10:43Z","pushed_at":"2017-08-29T07:55:19Z","git_url":"git://github.com/mathiasbynens/sizzle.git","ssh_url":"git@github.com:mathiasbynens/sizzle.git","clone_url":"https://github.com/mathiasbynens/sizzle.git","svn_url":"https://github.com/mathiasbynens/sizzle","homepage":"https://sizzlejs.com/","size":3513,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"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":0,"default_branch":"master"}},"base":{"label":"jquery:master","ref":"master","sha":"f6bd902659741290a3e7d33f0aca2ebed4897f0e","user":{"login":"jquery","id":70142,"avatar_url":"https://avatars1.githubusercontent.com/u/70142?v=4","gravatar_id":"","url":"https://api.github.com/users/jquery","html_url":"https://github.com/jquery","followers_url":"https://api.github.com/users/jquery/followers","following_url":"https://api.github.com/users/jquery/following{/other_user}","gists_url":"https://api.github.com/users/jquery/gists{/gist_id}","starred_url":"https://api.github.com/users/jquery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jquery/subscriptions","organizations_url":"https://api.github.com/users/jquery/orgs","repos_url":"https://api.github.com/users/jquery/repos","events_url":"https://api.github.com/users/jquery/events{/privacy}","received_events_url":"https://api.github.com/users/jquery/received_events","type":"Organization","site_admin":false},"repo":{"id":45547,"name":"sizzle","full_name":"jquery/sizzle","owner":{"login":"jquery","id":70142,"avatar_url":"https://avatars1.githubusercontent.com/u/70142?v=4","gravatar_id":"","url":"https://api.github.com/users/jquery","html_url":"https://github.com/jquery","followers_url":"https://api.github.com/users/jquery/followers","following_url":"https://api.github.com/users/jquery/following{/other_user}","gists_url":"https://api.github.com/users/jquery/gists{/gist_id}","starred_url":"https://api.github.com/users/jquery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jquery/subscriptions","organizations_url":"https://api.github.com/users/jquery/orgs","repos_url":"https://api.github.com/users/jquery/repos","events_url":"https://api.github.com/users/jquery/events{/privacy}","received_events_url":"https://api.github.com/users/jquery/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jquery/sizzle","description":"A sizzlin' hot selector engine.","fork":false,"url":"https://api.github.com/repos/jquery/sizzle","forks_url":"https://api.github.com/repos/jquery/sizzle/forks","keys_url":"https://api.github.com/repos/jquery/sizzle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jquery/sizzle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jquery/sizzle/teams","hooks_url":"https://api.github.com/repos/jquery/sizzle/hooks","issue_events_url":"https://api.github.com/repos/jquery/sizzle/issues/events{/number}","events_url":"https://api.github.com/repos/jquery/sizzle/events","assignees_url":"https://api.github.com/repos/jquery/sizzle/assignees{/user}","branches_url":"https://api.github.com/repos/jquery/sizzle/branches{/branch}","tags_url":"https://api.github.com/repos/jquery/sizzle/tags","blobs_url":"https://api.github.com/repos/jquery/sizzle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jquery/sizzle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jquery/sizzle/git/refs{/sha}","trees_url":"https://api.github.com/repos/jquery/sizzle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jquery/sizzle/statuses/{sha}","languages_url":"https://api.github.com/repos/jquery/sizzle/languages","stargazers_url":"https://api.github.com/repos/jquery/sizzle/stargazers","contributors_url":"https://api.github.com/repos/jquery/sizzle/contributors","subscribers_url":"https://api.github.com/repos/jquery/sizzle/subscribers","subscription_url":"https://api.github.com/repos/jquery/sizzle/subscription","commits_url":"https://api.github.com/repos/jquery/sizzle/commits{/sha}","git_commits_url":"https://api.github.com/repos/jquery/sizzle/git/commits{/sha}","comments_url":"https://api.github.com/repos/jquery/sizzle/comments{/number}","issue_comment_url":"https://api.github.com/repos/jquery/sizzle/issues/comments{/number}","contents_url":"https://api.github.com/repos/jquery/sizzle/contents/{+path}","compare_url":"https://api.github.com/repos/jquery/sizzle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jquery/sizzle/merges","archive_url":"https://api.github.com/repos/jquery/sizzle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jquery/sizzle/downloads","issues_url":"https://api.github.com/repos/jquery/sizzle/issues{/number}","pulls_url":"https://api.github.com/repos/jquery/sizzle/pulls{/number}","milestones_url":"https://api.github.com/repos/jquery/sizzle/milestones{/number}","notifications_url":"https://api.github.com/repos/jquery/sizzle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jquery/sizzle/labels{/name}","releases_url":"https://api.github.com/repos/jquery/sizzle/releases{/id}","deployments_url":"https://api.github.com/repos/jquery/sizzle/deployments","created_at":"2008-08-24T20:38:54Z","updated_at":"2017-08-29T04:50:14Z","pushed_at":"2017-08-29T07:56:56Z","git_url":"git://github.com/jquery/sizzle.git","ssh_url":"git@github.com:jquery/sizzle.git","clone_url":"https://github.com/jquery/sizzle.git","svn_url":"https://github.com/jquery/sizzle","homepage":"https://sizzlejs.com/","size":3513,"stargazers_count":5156,"watchers_count":5156,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":842,"mirror_url":null,"open_issues_count":25,"forks":842,"open_issues":25,"watchers":5156,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jquery/sizzle/pulls/407"},"html":{"href":"https://github.com/jquery/sizzle/pull/407"},"issue":{"href":"https://api.github.com/repos/jquery/sizzle/issues/407"},"comments":{"href":"https://api.github.com/repos/jquery/sizzle/issues/407/comments"},"review_comments":{"href":"https://api.github.com/repos/jquery/sizzle/pulls/407/comments"},"review_comment":{"href":"https://api.github.com/repos/jquery/sizzle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jquery/sizzle/pulls/407/commits"},"statuses":{"href":"https://api.github.com/repos/jquery/sizzle/statuses/88e5e6db8dc9e84836f7bb97ddfd20b8e67516a4"}}}}
{"actor":{"display_login":"markelog"}}