5 ms·
> From what I've heard WASM isn't a viable alternative in the first place. It's good for compute-heavy tasks, but the overhead involved in going from browser to
by fold_left 7y ago
> From what I've heard WASM isn't a viable alternative in the first place. It's good for compute-heavy tasks, but the overhead involved in going from browser to native to browser is too much to make WASM an alternative to what JavaScript is usually used for -- rendering interfaces and making pages interactive.
I don't think that's the case anymore: https://dassur.ma/things/is-postmessage-slow/ https://dassur.ma/things/is-postmessage-slow/
- snek 7y agoArticle is unrelated. The overhead for Wasm is from copying structs into and out of the Wasm's linear memory. Wasm only has ints and floats at the boundary, so you have to copy everything into structures it can understand. Note that there is work to improve this (interface types, anyref, etc), but we're not there yet.