Skip to content

A minimal-memory AnchorHash (consistent-hash) implementation for Go

License

Notifications You must be signed in to change notification settings

wdamron/go-anchorhash

Repository files navigation

package anchor

package anchor provides a minimal-memory AnchorHash consistent-hash implementation for Go.

import "github.com/wdamron/go-anchorhash"

More Info

Benchmarks

  • Go 1.12.1

  • 2017 Macbook Pro; noisy, with a number of applications running

  • 2.9 GHz Intel Core i7

  • 16 GB 2133 MHz LPDDR3

  • Capacity = 10

    • NewCompactAnchor(10, 10): BenchmarkGetBucket_10_10 200000000 5.81 ns/op
    • NewCompactAnchor(10, 9): BenchmarkGetBucket_9_10 200000000 6.71 ns/op
    • NewCompactAnchor(10, 5): BenchmarkGetBucket_5_10 100000000 10.8 ns/op
  • Capacity = 1,000,000

    • NewAnchor(1000000, 1000000): BenchmarkGetBucket_1m_1m 200000000 7.47 ns/op
    • NewAnchor(1000000, 900000): BenchmarkGetBucket_900k_1m 200000000 9.26 ns/op
    • NewAnchor(1000000, 500000): BenchmarkGetBucket_500k_1m 100000000 17.6 ns/op

About

A minimal-memory AnchorHash (consistent-hash) implementation for Go

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages