| ▲ | philipkglass 2 days ago | |||||||
There are a lot of "better than Bloom" filters that work similarly in some aspects. I have used Cuckoo [1] and Ribbon [2] filters for Bloom-type applications. If you have an application where you do a lot of one kind of searching, it may also be worth implementing a specialized variant of a data structure. I needed a Cuckoo-type filter on the JVM but only for 64 bit integers and I was able to make a smaller, faster code base that was specialized to this data type instead of handling generic objects. You need to know up front whether you need to be able to dynamically add entries to the filter or if your application can tolerate rebuilding the filter entirely whenever the underlying data changes. In the latter case you have more freedom to choose data structures; many of the modern "better than Bloom" filters are more compact but don't support dynamic updates. [1] https://en.wikipedia.org/wiki/Cuckoo_filter [2] https://engineering.fb.com/2021/07/09/core-infra/ribbon-filt... | ||||||||
| ▲ | hinkley 2 days ago | parent | next [-] | |||||||
I wonder how often in the wild people are tuning for a 1% false positive rate versus a much lower one, like .1%. You do quickly reach data set sizes where even 1% introduces some strain on resources or responsiveness. Cuckoo claims 70% of the size of bloom for the same error rate, and the space is logarithmic to the error rate. Looks like about 6.6 bits per record versus 9.56 bits for bloom at 1%. But at .5% error rate a cuckoo is 7.6 bpr. In fact you can get to about a .13% error rate for a cuckoo only a hair larger than the equivalent bloom filter (n^9.567 = 758.5) | ||||||||
| ||||||||
| ▲ | hijinks 2 days ago | parent | prev [-] | |||||||
thanks.. i'll read up into these.. always amazes me that companies like datadog somehow made log search quick | ||||||||