News for hackers. Stuff that matters.
Re:Show HN: HyperLogLog in Zig by kristoff_it on Monday January 09, 2023 @04:00PM (#34315996)
> doesn't this allocate 1<<p upfront though

Yes, it does. The idea (see the last code snipped in that post), is that the user delays the creation of the HLL until they are ready to switch to a dense representation. Before then, they just use a std.AutoHashMap directly.

Or, alternatively, the HLL could use the same buffer for both dense and sparse representation (see the Redis code).

There are no comments on this comment yet.