{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/29638660","id":29638660,"diff_hunk":"@@ -71,7 +72,13 @@ public static boolean isSet(Object baseObject, long baseOffset, int index) {\n    * Returns {@code true} if any bit is set.\n    */\n   public static boolean anySet(Object baseObject, long baseOffset, long bitSetWidthInBytes) {\n-    for (int i = 0; i <= bitSetWidthInBytes; i++) {\n+    int widthInLong = (int)(bitSetWidthInBytes / SIZE_OF_LONG);\n+    for (int i = 0; i <= widthInLong; i++) {\n+      if (PlatformDependent.UNSAFE.getLong(baseObject, baseOffset + i) != 0) {\n+        return true;\n+      }\n+    }\n+    for (int i = (int)(SIZE_OF_LONG * widthInLong); i < bitSetWidthInBytes; i++) {","path":"unsafe/src/main/java/org/apache/spark/unsafe/bitset/BitSetMethods.java","position":19,"original_position":19,"commit_id":"093b7a408905b0d760e1f4e6413cb7e7ec54f9d8","original_commit_id":"093b7a408905b0d760e1f4e6413cb7e7ec54f9d8","user":{"login":"JoshRosen","id":50748,"avatar_url":"https://avatars.githubusercontent.com/u/50748?v=3","gravatar_id":"","url":"https://api.github.com/users/JoshRosen","html_url":"https://github.com/JoshRosen","followers_url":"https://api.github.com/users/JoshRosen/followers","following_url":"https://api.github.com/users/JoshRosen/following{/other_user}","gists_url":"https://api.github.com/users/JoshRosen/gists{/gist_id}","starred_url":"https://api.github.com/users/JoshRosen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoshRosen/subscriptions","organizations_url":"https://api.github.com/users/JoshRosen/orgs","repos_url":"https://api.github.com/users/JoshRosen/repos","events_url":"https://api.github.com/users/JoshRosen/events{/privacy}","received_events_url":"https://api.github.com/users/JoshRosen/received_events","type":"User","site_admin":false},"body":"It looks like this block now contains two `for` loops.  A bad merge conflict resolution, perhaps?","created_at":"2015-05-05T01:11:21Z","updated_at":"2015-05-05T01:11:21Z","html_url":"https://github.com/apache/spark/pull/5897#discussion_r29638660","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/5897","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/29638660"},"html":{"href":"https://github.com/apache/spark/pull/5897#discussion_r29638660"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/5897"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/5897","id":34686939,"html_url":"https://github.com/apache/spark/pull/5897","diff_url":"https://github.com/apache/spark/pull/5897.diff","patch_url":"https://github.com/apache/spark/pull/5897.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/5897","number":5897,"state":"open","locked":false,"title":"Use UNSAFE.getLong() to speed up BitSetMethods#anySet()","user":{"login":"tedyu","id":235188,"avatar_url":"https://avatars.githubusercontent.com/u/235188?v=3","gravatar_id":"","url":"https://api.github.com/users/tedyu","html_url":"https://github.com/tedyu","followers_url":"https://api.github.com/users/tedyu/followers","following_url":"https://api.github.com/users/tedyu/following{/other_user}","gists_url":"https://api.github.com/users/tedyu/gists{/gist_id}","starred_url":"https://api.github.com/users/tedyu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tedyu/subscriptions","organizations_url":"https://api.github.com/users/tedyu/orgs","repos_url":"https://api.github.com/users/tedyu/repos","events_url":"https://api.github.com/users/tedyu/events{/privacy}","received_events_url":"https://api.github.com/users/tedyu/received_events","type":"User","site_admin":false},"body":"@JoshRosen \r\nPlease take a look","created_at":"2015-05-04T23:59:09Z","updated_at":"2015-05-05T01:11:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2c478d74b89d6d362992b8dda15cb06d1970342e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/5897/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/5897/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/5897/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/093b7a408905b0d760e1f4e6413cb7e7ec54f9d8","head":{"label":"tedyu:master","ref":"master","sha":"093b7a408905b0d760e1f4e6413cb7e7ec54f9d8","user":{"login":"tedyu","id":235188,"avatar_url":"https://avatars.githubusercontent.com/u/235188?v=3","gravatar_id":"","url":"https://api.github.com/users/tedyu","html_url":"https://github.com/tedyu","followers_url":"https://api.github.com/users/tedyu/followers","following_url":"https://api.github.com/users/tedyu/following{/other_user}","gists_url":"https://api.github.com/users/tedyu/gists{/gist_id}","starred_url":"https://api.github.com/users/tedyu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tedyu/subscriptions","organizations_url":"https://api.github.com/users/tedyu/orgs","repos_url":"https://api.github.com/users/tedyu/repos","events_url":"https://api.github.com/users/tedyu/events{/privacy}","received_events_url":"https://api.github.com/users/tedyu/received_events","type":"User","site_admin":false},"repo":{"id":35066965,"name":"spark","full_name":"tedyu/spark","owner":{"login":"tedyu","id":235188,"avatar_url":"https://avatars.githubusercontent.com/u/235188?v=3","gravatar_id":"","url":"https://api.github.com/users/tedyu","html_url":"https://github.com/tedyu","followers_url":"https://api.github.com/users/tedyu/followers","following_url":"https://api.github.com/users/tedyu/following{/other_user}","gists_url":"https://api.github.com/users/tedyu/gists{/gist_id}","starred_url":"https://api.github.com/users/tedyu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tedyu/subscriptions","organizations_url":"https://api.github.com/users/tedyu/orgs","repos_url":"https://api.github.com/users/tedyu/repos","events_url":"https://api.github.com/users/tedyu/events{/privacy}","received_events_url":"https://api.github.com/users/tedyu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tedyu/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/tedyu/spark","forks_url":"https://api.github.com/repos/tedyu/spark/forks","keys_url":"https://api.github.com/repos/tedyu/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tedyu/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tedyu/spark/teams","hooks_url":"https://api.github.com/repos/tedyu/spark/hooks","issue_events_url":"https://api.github.com/repos/tedyu/spark/issues/events{/number}","events_url":"https://api.github.com/repos/tedyu/spark/events","assignees_url":"https://api.github.com/repos/tedyu/spark/assignees{/user}","branches_url":"https://api.github.com/repos/tedyu/spark/branches{/branch}","tags_url":"https://api.github.com/repos/tedyu/spark/tags","blobs_url":"https://api.github.com/repos/tedyu/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tedyu/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tedyu/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/tedyu/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tedyu/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/tedyu/spark/languages","stargazers_url":"https://api.github.com/repos/tedyu/spark/stargazers","contributors_url":"https://api.github.com/repos/tedyu/spark/contributors","subscribers_url":"https://api.github.com/repos/tedyu/spark/subscribers","subscription_url":"https://api.github.com/repos/tedyu/spark/subscription","commits_url":"https://api.github.com/repos/tedyu/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/tedyu/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/tedyu/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/tedyu/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/tedyu/spark/contents/{+path}","compare_url":"https://api.github.com/repos/tedyu/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tedyu/spark/merges","archive_url":"https://api.github.com/repos/tedyu/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tedyu/spark/downloads","issues_url":"https://api.github.com/repos/tedyu/spark/issues{/number}","pulls_url":"https://api.github.com/repos/tedyu/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/tedyu/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/tedyu/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tedyu/spark/labels{/name}","releases_url":"https://api.github.com/repos/tedyu/spark/releases{/id}","created_at":"2015-05-04T23:56:48Z","updated_at":"2015-05-05T01:09:45Z","pushed_at":"2015-05-05T01:09:45Z","git_url":"git://github.com/tedyu/spark.git","ssh_url":"git@github.com:tedyu/spark.git","clone_url":"https://github.com/tedyu/spark.git","svn_url":"https://github.com/tedyu/spark","homepage":null,"size":1590090,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"apache:master","ref":"master","sha":"fc8b58195afa67fbb75b4c8303e022f703cbf007","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":17165658,"name":"spark","full_name":"apache/spark","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/spark","description":"Mirror of Apache Spark","fork":false,"url":"https://api.github.com/repos/apache/spark","forks_url":"https://api.github.com/repos/apache/spark/forks","keys_url":"https://api.github.com/repos/apache/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/spark/teams","hooks_url":"https://api.github.com/repos/apache/spark/hooks","issue_events_url":"https://api.github.com/repos/apache/spark/issues/events{/number}","events_url":"https://api.github.com/repos/apache/spark/events","assignees_url":"https://api.github.com/repos/apache/spark/assignees{/user}","branches_url":"https://api.github.com/repos/apache/spark/branches{/branch}","tags_url":"https://api.github.com/repos/apache/spark/tags","blobs_url":"https://api.github.com/repos/apache/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/spark/languages","stargazers_url":"https://api.github.com/repos/apache/spark/stargazers","contributors_url":"https://api.github.com/repos/apache/spark/contributors","subscribers_url":"https://api.github.com/repos/apache/spark/subscribers","subscription_url":"https://api.github.com/repos/apache/spark/subscription","commits_url":"https://api.github.com/repos/apache/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/spark/contents/{+path}","compare_url":"https://api.github.com/repos/apache/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/spark/merges","archive_url":"https://api.github.com/repos/apache/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/spark/downloads","issues_url":"https://api.github.com/repos/apache/spark/issues{/number}","pulls_url":"https://api.github.com/repos/apache/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/spark/labels{/name}","releases_url":"https://api.github.com/repos/apache/spark/releases{/id}","created_at":"2014-02-25T08:00:08Z","updated_at":"2015-05-05T01:03:32Z","pushed_at":"2015-05-05T01:09:46Z","git_url":"git://github.com/apache/spark.git","ssh_url":"git@github.com:apache/spark.git","clone_url":"https://github.com/apache/spark.git","svn_url":"https://github.com/apache/spark","homepage":null,"size":1590090,"stargazers_count":3855,"watchers_count":3855,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3344,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":309,"forks":3344,"open_issues":309,"watchers":3855,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/5897"},"html":{"href":"https://github.com/apache/spark/pull/5897"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/5897"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/5897/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/5897/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/5897/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/093b7a408905b0d760e1f4e6413cb7e7ec54f9d8"}}}}