Hacker News new | ask | show | jobs
by rrobukef 3040 days ago
But no count of how often the hash is used. Counting bloom filters are till a bit harder to implement.
1 comments

Counting bloom filters are only marginally more difficult to implement. To increment a key, find the minimum value stored in all of the slots for the key, and then increment all of the stored values for that key that are equal to the minimum value. To read, return the minimum value for all of the values stored in slots for the key.

For these purposes, however, you probably instead want to store just separate Bloom filters for counts above different thresholds, since the common use case would be accept/reject decisions based upon a single threshold.