golang/groupcache — pull request #26 by dgryski (2014-06-17 15:18:53+00:00)
Title: 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%