Hyperloglog: Counting Without Counting
karthihegde.dev·1d·
Discuss: Hacker News
Flag this post

HyperLogLog: Counting without Counting

Every time I read about a probabilistic data structure, I’m blown away — like, who even came up with this stuff? (Philippe Flajolet did). Even after I understand how it works, it still feels magical.

In this blog, I’ll explain how it works — with as few Greek letters as possible, So you have your mind blown too :)

I’ve implemented the HyperLogLog algorithm in Zig. Check out the repository here:

https://github.com/dracarys18/wood

## Counting Unique Elements

Counting unique elements is a memory heavy task, it requires you to remember all the elements that has ever been pushed to the set which could be very high. Hyperloglog on the other hand uses small constant amount of memory to get the unique…

Similar Posts

Loading similar posts...