News for hackers. Stuff that matters.
Re:Show HN: An improved version of HyperLogLog by zintinio5 on Monday June 26, 2017 @01:25PM (#14638597)
If what you want is an approximate answer, take a look at

* Counting Bloom Filter https://en.wikipedia.org/wiki/Bloom_filter#Counting_filters

* Count-Min Sketch https://en.wikipedia.org/wiki/Count%E2%80%93min_sketch

Here's a library: https://datasketches.github.io/

However, you can probably fit an exact answer into memory with just a simple hashtable if you've only got 20 million objects. A single byte could be used as the state marker.

Either that, or just track 6 counts.

There are no comments on this comment yet.