4 ms·
I haven't checked the source code but generally calls between runtime boundaries are costly (JS to WebAssembly) so it's critical to do all the work in WebAssemb
by Shoothe 9y ago
I haven't checked the source code but generally calls between runtime boundaries are costly (JS to WebAssembly) so it's critical to do all the work in WebAssembly and just return a complete solution at the end.
- netgusto 9y agoYes. Until [1], WASM in the browser is to be used like we use a GPU : crazy fast, but expensive calls and memory to/from JS [1]: https://github.com/WebAssembly/host-bindings/blob/master/proposals/host-bindings/Overview.md https://github.com/WebAssembly/host-bindings/blob/master/pro...
- s-macke 9y agoAs far as I know every function call in and out of WebAssembly or asm.js must run through a foreign function interface (FFI)to translate between different binary interfaces. This can be very costly. Mapping and copying of data is necessary. And don't forget the garbage collector.