Skip to content
/ hllpp Public
forked from retailnext/hllpp

HyperLogLog++ cardinality estimation algorithm in go/golang!

License

Notifications You must be signed in to change notification settings

skizzehq/hllpp

 
 

Repository files navigation

hllpp

Build Status GoDoc

hllpp is an implementation of the HyperLogLog++ cardinality estimation algorithm in go. It optimizes for memory usage over CPU usage. It implements all the HyperLogLog optimizations introduced in the HyperLogLog++ paper (http://goo.gl/Z5Sqgu). Some notable features include:

  • marshaling so you can serialize to your datastore
  • extra space savings by only using 5 bits per register when possible
  • built-in non-streaming murmur3 implementation for fast hashing of input data

Usage

h := hllpp.New()

h.Add([]byte("barclay"))
h.Add([]byte("reginald"))
h.Add([]byte("barclay"))
h.Add([]byte("broccoli"))

fmt.Println(h.Count())
// Output: 3

See the godocs for documentation and more examples.

About

HyperLogLog++ cardinality estimation algorithm in go/golang!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%