This simulator shows how hashing items into buckets and tracking the longest leading-zero run per bucket lets you estimate a huge distinct-item count using only a small, fixed amount of memory.
Add items one at a time or in bulk, choose the number of buckets, and watch the per-bucket run lengths and the harmonically averaged cardinality estimate update as you go.
Controls let you add single or batch items, adjust the number of buckets (registers), and reset the simulation to compare estimated versus true distinct counts.
Redis caps its HyperLogLog structures at roughly 12 kilobytes no matter how many billions of items you add, yet still estimates cardinality within about 2 percent error.
This simulator shows how hashing items into buckets and tracking the longest leading-zero run per bucket lets you estimate a huge distinct-item count using only a small, fixed amount of memory.
This simulator shows how hashing items into buckets and tracking the longest leading-zero run per bucket lets you estimate a huge distinct-item count using only a small, fixed amount of memory.
Add items one at a time or in bulk, choose the number of buckets, and watch the per-bucket run lengths and the harmonically averaged cardinality estimate update as you go.
Redis caps its HyperLogLog structures at roughly 12 kilobytes no matter how many billions of items you add, yet still estimates cardinality within about 2 percent error.