Permalink
Browse files

#735 -- allows sortedIndex to work on extremely large arrays.

  • Loading branch information...
1 parent ab31329 commit e852e0129f0e618652eb55f416eee2f90de18b4d @jashkenas committed Sep 20, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 underscore.js
View
2 underscore.js
@@ -354,7 +354,7 @@
var value = iterator(obj);
var low = 0, high = array.length;
while (low < high) {
- var mid = (low + high) >> 1;
+ var mid = (low + high) >>> 1;
iterator(array[mid]) < value ? low = mid + 1 : high = mid;
}
return low;

0 comments on commit e852e01

Please sign in to comment.