5 ms·
used to be, in the early days, but nowadays runtimes optimized the function call overhead between WASM and JS to near zero https://hacks.mozilla.org/2018/10/ca
by nasso_dev 1y ago
used to be, in the early days, but nowadays runtimes optimized the function call overhead between WASM and JS to near zero
https://hacks.mozilla.org/2018/10/calls-between-javascript-and-webassembly-are-finally-fast-%F0%9F%8E%89/ https://hacks.mozilla.org/2018/10/calls-between-javascript-a...
- lukan 1y agoIt did improved a lot, but unfortunately not near zero enough. It is managable if you avoid js wasm round trips, but if you assume the cost is near zero you will be in for a unpleasant surprise. When I have to do a lot of different calls into my wasm blob, I am way way faster batching them. Meaning making one cal into wasm, that then gets all the data I want and returns it.