Global Feed Post Login
Replying to Avatar ᴛʜᴇ ᴅᴇᴀᴛʜ ᴏꜰ ᴍʟᴇᴋᴜ

yeah, i tried to write a decoder cache, for the network, it was too much complication for probably too little gain

i think a more prospective optimization is isolating the binary and json versions to only on the wire and on the db, so all other work with them stays in the fast native form, the default event struct with hex encoding for id, pubkey and signature is not optimal, honestly they should all be their native type - except the ID should be []byte

the internal version of the pubkey should be the same one that is used in the btcec signature verify function and the signature should be a schnorr.Signature type

changes i long ago put on my mental todo list but forgot

Avatar
ᴛʜᴇ ᴅᴇᴀᴛʜ ᴏꜰ ᴍʟᴇᴋᴜ 1y ago

also, yes, reusing buffers is a huge thing... reducing the cost of GC on stuff that you can easily reuse is an easy win

Reply to this note

Please Login to reply.

Discussion

No replies yet.