Skip to content

Commit

Permalink
Use UNSAFE.getLong() to speed up BitSetMethods#anySet()
Browse files Browse the repository at this point in the history
  • Loading branch information
tedyu committed May 5, 2015
1 parent 3e9b691 commit 4ca0ef6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static boolean anySet(Object baseObject, long baseOffset, long bitSetWidt
return true;
}
}
for (long i = SIZE_OF_LONG * widthInLong; i <= bitSetWidthInBytes; i++) {
for (long i = SIZE_OF_LONG * widthInLong; i < bitSetWidthInBytes; i++) {
if (PlatformDependent.UNSAFE.getByte(baseObject, baseOffset + i) != 0) {
return true;
}
Expand Down

0 comments on commit 4ca0ef6

Please sign in to comment.