4 ms·
Prove it. I don't believe you, and you haven't posted any data. Try compiling some computationally intensive code with wasm-pack (and rust) and run it against a
by leshow 8y ago
Prove it. I don't believe you, and you haven't posted any data. Try compiling some computationally intensive code with wasm-pack (and rust) and run it against an idiomatic javascript version. The Rust/wasm version will be faster, smaller, more efficient.
If you're compiling the C code with emscripten into a asmjs or something, then of course it's going to be bigger and slower.
But again, without a shred of proof, we have no way to know.
- flohofwoe 8y agoAfter compression, asmjs and wasm come out at about the same size (give or take 5% or so), wasm is also about the same speed as asmjs (unless you need a lot of 64-bit integer operations, or you're running the asmjs on iOS Safari which doesn't seem to have any special handling for asmjs). Also, C via emscripten vs Rust via the LLVM wasm backend shouldn't make much of a difference as long as you don't need to use emscripten's browser shims (you can compile 'naked' WASM without any C or JS runtime in emscripten too).