4 ms·
Why not a shared buffer? Serializing into JSON on this hot path should be entirely avoidable
by nallana 7mo ago
Why not a shared buffer? Serializing into JSON on this hot path should be entirely avoidable
- devnotes77 7mo ago[dead]
- mavdol04 7mo agoI think a shared array just avoids the copy, not the serialization which is the main problem as they showed with serde-wasm-bindgen test
- notnullorvoid 7mo agoYou can avoid the serialization in WASM by pushing structured bytes to the SharedArrayBuffer, then do serialization in JS which should be relatively cheap compared to pushing JSON strings across the boundary.