by manish_gill · 9y ago · 0 comments
> A single HyperLogLog++ structure, for example, can count up to 7.9 billion unique items using 2.56KB of memory with only a 1.65% error rate.
Incidentally, Redis has an implementation for HyperLogLogs that has an even smaller error rate of 0.83%, though it uses more memory if I recall correctly. :)
[0] https://blog.codeship.com/counting-distinct-values-with-hype... [1] https://upload.wikimedia.org/wikipedia/commons/a/aa/Dickens_...
HLL is used to determine how many unique items you have, the cardinality of a set.
Bloom/Cuckoo is used to determine set membership, as in "have I seen this item before".
Not sure how much that helps but the distinction was lost on me when I started reading about them.
As an example, a search engine might want to have several HyperLogLog counts for every URL on the Internet. In that case, a 64-bit count may be a good choice over 12 kilobytes.