5 ms·
The answer is compilers. The WASM compilers are still being optimized. Most of what you see in the wild is compiled using LLVM, even the Rust project. The WASM
by muthdra 9y ago
The answer is compilers.
The WASM compilers are still being optimized. Most of what you see in the wild is compiled using LLVM, even the Rust project. The WASM target is still under development so you can expect a lot of improvement there.
One day we will see a language that compiles natively to WASM. Maybe even exclusively to WASM, with crazy optimizations akin to GCC's tricks with x86. I just hope it won't have objects.
- vanderZwan 9y agoAh, that makes sense. That also would imply that more and more domains where JS has the advantage now will shift towards WASM in the long term. Might part of the issue also be that there are now two compilation phases: to-WASM, and WASM-to-native? If the WASM bytecode produced isn't easily optimised by the WASM-to-native phase (I assume only the most basic optimisations are made at that stage) that may also result in slowdowns. I'm wondering if this can become a source of unexpected instability in WASM performance across JavaScript engines, kind of like how built-in functions can vary wildly in performance across JavScript engines right now.