Conversation with a Bloom filter

I don’t use bloom filters much (ok, never), but I’ve got the algorithm and potential use cases in my back pocket as a go-to for a space-efficient hashed set with some limitations.   However it’s always hard for me to remember what it’s good for. But I think I’ve found a good mnemonic:

If you ask a bloom filter if it has something, it will never say yes.   It will either say “no” or “probably”.  

If your particular application needs to know something about the existence of items in a set, and can live with the clarity of no and the vagueness of “probably”, a bloom filter might be the right tool.

Leave a Reply

Your email address will not be published. Required fields are marked *