HyperLogLog Cardinality Lab (2D)
2D companion to the HyperLogLog simulator: a real murmur-style hash routes a live item stream into registers, each keeping only its longest leading-zero run, while a harmonic-mean estimator reconstructs the true distinct count from a few kilobytes of state.
This 2D companion runs the same real HyperLogLog math as the 3D version — a murmur-style avalanching hash, per-bucket leading-zero-run registers, and the harmonic-mean estimator with small-range linear-counting correction — through a flat grid of registers instead of an orbiting 3D scene: watch items stream in and land in their bucket, brighten a register only when they set a new longest run, and compare the live estimate against the true distinct count as you change the bucket count or how often the stream repeats old items.
2D HyperLogLog lab: a real murmur-style hash routes items into registers tracking the longest leading-zero run per bucket, and a harmonic-mean estimator with small-range correction reconstructs the distinct count live.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install