7 ms·
Isn't there a variant that uses a counter instead of a bit. If counter > 0 the flag is set?
by dlhavema 10y ago
Isn't there a variant that uses a counter instead of a bit. If counter > 0 the flag is set?
- dmlittle 10y agoYes, but by using a counter you increase the size of the filter and you introduce the possibility of overflows. Let's say you use 3 bits to count (rather than 1) your filter is now x3 the size and if you end up adding more than 7 items with the same key, you'll get an overflow and your false positive rate will go up. Cuckoo filters allow for deletions while using less space than a bloom or counting filter.