Oddbean new post about | logout
 bloom filters of the event IDs and the user IDs will help a lot for fast elimination of non-matches

maybe some kind of "current list" event with the account fingerprints - i dunno how good npub entropy is but probably the first 12 bytes zero chance of collisions within one user's follow list, probably 8 bytes is enough - to make actually finding the nprofiles easier 
 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?