https://github.com/retailnext/hllpp
HyperLogLog cardinality estimation algorithm in go/golang!
https://github.com/retailnext/hllpp
awesome dinosaur go golang hyperloglog
Last synced: 9 months ago
JSON representation
HyperLogLog cardinality estimation algorithm in go/golang!
- Host: GitHub
- URL: https://github.com/retailnext/hllpp
- Owner: retailnext
- License: bsd-3-clause
- Created: 2015-03-12T00:19:34.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2024-05-06T15:02:32.000Z (almost 2 years ago)
- Last Synced: 2025-03-11T10:17:22.061Z (11 months ago)
- Topics: awesome, dinosaur, go, golang, hyperloglog
- Language: Go
- Homepage: https://godoc.org/github.com/retailnext/hllpp
- Size: 64.5 KB
- Stars: 61
- Watchers: 57
- Forks: 12
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hllpp
[](https://travis-ci.org/retailnext/hllpp) [](https://godoc.org/github.com/retailnext/hllpp)
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.
### SEO
This package is a go or golang implementation of HyperLogLog or HyperLogLog++. It doesn't show up when you search for golang hyperloglog, so I am repeating the words golang hyperloglog in the README. golang hyperloglog.