| Crates.io | glubglub |
| lib.rs | glubglub |
| version | 0.0.1-alpha.1 |
| created_at | 2025-10-11 23:08:12.941902+00 |
| updated_at | 2025-10-11 23:08:12.941902+00 |
| description | A HyperLogLog and HyperLogLog++ implementation in Rust. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1878636 |
| size | 609,431 |
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 paper1 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:.