Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
consistenthash: replace linear search with binary search
The binary search quickly out-paces the linear search, even for a small number of shards and replicas. benchmark old ns/op new ns/op delta BenchmarkGet8 122 122 +0.00% BenchmarkGet32 471 137 -70.91% BenchmarkGet128 5619 254 -95.48% BenchmarkGet512 90302 406 -99.55%
- Loading branch information