groupcache/consistenthash
Damian Gryski 89ec0544ae 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%
2014-06-17 17:09:50 +02:00
..
consistenthash_test.go consistenthash: replace linear search with binary search 2014-06-17 17:09:50 +02:00
consistenthash.go consistenthash: replace linear search with binary search 2014-06-17 17:09:50 +02:00