What is Nostr?
jb55 / Will
npub1xts…kk5s
2024-11-20 20:40:02

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

researching 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.
Author Public Key
npub1xtscya34g58tk0z605fvr788k263gsu6cy9x0mhnm87echrgufzsevkk5s