Which is more effcient?

What is more efficent, a Cuckoo filetr or a Bloom filter?

Hello Juan,

Like many other great questions, the answer here is - it depends.

It depends on

  • The number of items in filter that you are going to query. (Bloom filter is slower on those than Cuckoo).
  • The number of inserts vs queries you are going to run. (Cuckoo, for example, has constant query time but insert time can grow significantly as the filter is filled).
  • The false-negative error rate you are seeking. (Bloom is very flexible, Cuckoo is usually steady at 3%).
  • Do you need the option to delete an item? (Cuckoo supports it, Bloom does not).
  • Maybe even the sort of data you are hashing.

If you want to share with me your use case, we can brainstorm the best option for you.