Oddbean new post about | logout
 Is a bloom filter faster than a hashset or a linked list in this case? 
 since the data is mutable probably a cuckoo filter is better

the benefit of using the filter is that when a relay is watching streams of events come in and a user has a subscription open this can eliminate a lot of work checking the list of follows

the filters sometimes false positive but they never false negative, so if the cuckoo filter says no then you can skip checking the follows list, if it says yes you have to check but the chances are pretty low that it will not be worth the dig
 
 I just did a benchmark and bloom filters are slower than default hashmaps with event ids for this job. 
 if you have the whole key table in memory then sure, of course it's no benefit lol

lmdb? how many gigabytes of memory?