Y
Hacker News
new
|
ask
|
show
|
jobs
by
nallana
90 days ago
Why not a shared buffer? Serializing into JSON on this hot path should be entirely avoidable
1 comments
mavdol04
90 days ago
I think a shared array just avoids the copy, not the serialization which is the main problem as they showed with serde-wasm-bindgen test
link
notnullorvoid
89 days ago
You 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.
link