MINOR: More efficient midpoint calc for AbstractIndex
Reviewers: Ismael Juma
@@ -377,7 +377,7 @@ abstract class AbstractIndex[K, V](@volatile var file: File, val baseOffset: Lon
var lo = begin
var hi = end
while(lo < hi) {
- val mid = ceil(hi/2.0 + lo/2.0).toInt
+ val mid = (lo + hi) >>> 1
val found = parseEntry(idx, mid)
val compareResult = compareIndexEntry(found, target, searchEntity)
if(compareResult > 0)
