Why Nostr? What is Njump?
2025-01-05 13:25:17
in reply to

mleku on Nostr: hand-made json parser custom built for nostr makes a HUGE difference, i mean, it's ...

hand-made json parser custom built for nostr makes a HUGE difference, i mean, it's almost as fast as marshalling to binary, either wire JSON or canonical form, and unmarshaling is even faster because it is able to take so many shortcuts you can't do with a general JSON unmarshal, because you know what the data structure MUST be

that was why i ended up changing over the database storage to canonical form with the signature attached, it's probably on par with any binary codec for storing the events, and getting the binary codecs to behave was too hard, lol... i just enable ZSTD compression on the database and that is that

the real boost in measurable performance on nostr relays is all about json encoding

gah i been buried in this stuff so long, i will win me a prize from it!
Author Public Key
npub1fjqqy4a93z5zsjwsfxqhc2764kvykfdyttvldkkkdera8dr78vhsmmleku