Home▸Algorithms & AI▸HyperLogLog Cardinality Lab (2D)

🧮 HyperLogLog Cardinality Lab (2D)

2D HyperLogLog lab: watch a real murmur-style hash route items into registers, each tracking the longest leading-zero run, while a harmonic-mean estimator reconstructs the true distinct count from a few kilobytes.

Algorithms & AI2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
HyperLogLog Cardinality Lab (2D) ↗ Open standalone

A 2D grid of registers lights up as a real murmur-style hash routes a stream of items into buckets, each register keeping only the longest leading-zero run it has seen — the harmonic-mean estimator then reconstructs the true distinct count from that handful of bytes.

⚙ Under the hood

A 2D grid of HyperLogLog registers fills as a real hash routes a stream of items into buckets, showing how a harmonic-mean estimate tracks the true distinct count.

hyperloglogcardinality-estimationprobabilistic-algorithmsdata-structureshashingstreaming-algorithms

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)