4 ms·
By compiling to JavaScript, you're still getting the slow JavaScript loading/parsing/JITting performance and not WASM fast path. The blocker here is that JavaS
by exDM69 10y ago
By compiling to JavaScript, you're still getting the slow JavaScript loading/parsing/JITting performance and not WASM fast path.
The blocker here is that JavaScript standard browser APIs are not accessible from WASM yet.
By compiling to JavaScript the only thing you gain is developer comfort at the expense of toolchain complexity. And developer comfort is of arguable value.
E.g. I would like to use the browser for UI on my native code projects that require all the CPU resources available (I can't afford the 2x to 10x slowdown from using JavaScript and I need real integers and 32 bit floats with SIMD). Right now my only option would be to write UI in JavaScript and access the native code (in a different processes) through a WebSocket.