glubglub 0.0.1-alpha.1

A HyperLogLog and HyperLogLog++ implementation in Rust.
Documentation
  • Coverage
  • 21.43%
    3 out of 14 items documented0 out of 11 items with examples
  • Size
  • Source code size: 609.4 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 170.5 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Fryuni

GlubGlub

This library implements the HyperLogLog++[^1] descbribed by the original paper as an exercise of Rust and data storage algorithms.

It includes a RawHLL type that accepts u64 hashes computed by the caller as well as a HLL<T: Hash> that uses Metro Hash (64bits variation 1) from fasthash.

Tests ensure that on many different scenarios the error margin compared to the true count stays within a small acceptable range. Fuzz testing is included in order to find problems with the bit fidling parts of the algorithm.

If you find some problem in this library feel free to reach out, I'd love to learn more, but be aware that this is library is not being maintained for a real usecase that I have so it is not battle-tested for production.

A copy of the original paper[^1] along with my own notes made as I read the paper and wrote the implementation is included in this repo named HLL++.pdf. The notes were made with Apple's default PDF Preview app, I am not sure how inter-compatible PDF annotations are between applications. GitHub's web preview shows the highlights where the notes are but doesn't show the notes themselves, download the file if you want to read them :smiley:.

[^1]: Heule, S., Nunkesser, M., & Hall, A. (2013). HyperLogLog in Practice: Algorithmic Engineering of a State of The Art Cardinality Estimation Algorithm.