Comment by masklinn
4 days ago
Mozilla tried that with asmjs. Turns out javascript has pretty half-assed semantics (notably around integer types), nobody wants to expand it to a useful compilation (asmjs was mostly an optimisation for hand-written code) target, and few want to compile to text, especially javascript.
Having a proper and well defined ISA is a lot more compelling.
Not only that, but it allows WASM-only compilers and runtimes with none of the JS baggage, and thus use of WASM outside of a browser context and with significantly lower resources requirements.
That makes it sound like WASM only exists because of the nerdy preferences of compiler makers, not because of any benefits to the users of applications?
If speed is fine, why would a user care if the application was compiled to a language with "half-assed semantics" in a text format?
I don't think speed is fine. Here's a write-up from Mozilla which talks about the performance benefits of WASM compared to asm.js: https://hacks.mozilla.org/2017/03/why-webassembly-is-faster-...
FWIW, switching from asm.js to wasm in was hardly noticeable performance-wise for my code (at least in browsers that already had a special 'fast-path' for asm.js).