jb55 on Nostr: Minimal perfect hashtables are awesome. I use it in btcs (my bitcoin script ...
Minimal perfect hashtables are awesome. I use it in btcs (my bitcoin script interpreter) for mapping opcode names to the opcodes themselves when parsing. It works great when you have a fixed dictionary, like the words in a note. It also uses minimal space so we can pack it nicely within nostrdb as an optimized datastructure for checking if a note contains a word. #nerdstr
Sorry ill stop nerdposting now
Sorry ill stop nerdposting now
quoting note1wr7…avy9researching a way to build a minimal perfect hashmap of words to store alongside the binary note in nostrdb so that nostrdb clients (damus ios, damus notedeck, zaptream rust) can do O(1) mute word matching, which is pretty important for performance when you have 100s of mute words.