Baldur Bjarnason on Nostr: Doing a bit of benchmarking for a project to get a sense of the various different ...
Doing a bit of benchmarking for a project to get a sense of the various different approaches available in JS for serialising objects to buffers and the surprising bit is just how fast browser-native encoder.encode(JSON.stringify(data)) really is
The cbor or msgpack serialisers were usually 200-1000% slower. The only one that came within a spitting distance of native JSON serialisation was cbor-x and that's 30kB minified
Though the difference is probably not noticeable for small (<5kB) objects
The cbor or msgpack serialisers were usually 200-1000% slower. The only one that came within a spitting distance of native JSON serialisation was cbor-x and that's 30kB minified
Though the difference is probably not noticeable for small (<5kB) objects