Exploration of a few implementations of HyperLogLog in Python.
HLL.ipynb— the original notebook (written in 2016 in Python 2), kept as an artifact. Six hand-written HLL implementations (HLL1–HLL6) exploring memory/speed tradeoffs.HLL_2026.ipynb— a 2026 companion: the same six implementations ported to Python 3, plus a head-to-head benchmark (accuracy / speed / memory) against three current libraries —datasketch,hyperloglog, and Apachedatasketches.
Managed as a uv project:
uv sync # create the venv and install dependencies
uv run jupyter lab HLL_2026.ipynb # launch with the project kernel