Oddbean new post about | logout
 i just learned about this tho

https://github.com/deneonet/benc

from this:

https://alecthomas.github.io/go_serialization_benchmarks/

and i can't help myself but implement it lol

faster than flatbuffers... faster than capn proto

the benefits of those flat/decode on demand style of codecs are zero when you actually need the whole data and taking advantage of it, requires refactoring an entire search matching library (filters in nostr)

so, i'm just gonna go with this

its syntax is like Go except also like Protobuf

it has some scheme about versioning and shit but honestly for this use case, like, such as replacing the entire nostr encoding, with the envelopes, filters and events... this would be the hands down best option because the data usually needs to be matched on several criteria in the "extra filter" used in the database indexing scheme that fiatjaf devised, so the extra logic to decode them before running the match when half the time half the fields need to be decoded, and most of the fields except for two are already just raw bytes in my data structure format...

this is it, no more fucking around, the end, faster than this is impossiburu