Replying to Avatar Colby Serpa

CBOR is only a bit faster indeed, but the real gains come from switching to binary with the array.

I suggested CBOR because it is the simplest binary encoder, akin to JSON. All the other binary encoders require schemes. JSON is schemaless, like CBOR.

We spent a lot time making everything backwards compatible btw, so I hope JSONs are quick enough for the future. :-)

Avatar
fiatjaf 2y ago

NSON is pretty fast: https://github.com/nbd-wtf/go-nostr/tree/master/nson

But when you compare the speed gains of using anything other than JSON (even if you use the fastest possible binary encoding) with the time it takes to verify a signature then you see how pointless all these efforts are.

Reply to this note

Please Login to reply.

Discussion

Avatar
ocknamo(早く寝ろ) 2y ago

CBORで検索してたらNSONとかいうのを見つけた

nostr:nevent1qqsvczxyjvtnf08j8nt5p5m8f5843hart456f3gje2rqwawk8kns0kqpramhxue69uhkummnw3ez6un9d3shjtnwda4k7arpwfhjucm0d5hsygpm7rrrljungc6q0tuh5hj7ue863q73qlheu4vywtzwhx42a7j9n5psgqqqqqqsrklly8

Thread collapsed