Fixed to use binary search.
Added redundant store to suppress warning.
Added more testing.
Added more threads for big heap.