2 ms·
They were developed with different goals. WebAssembly is a stripped down version of asm.js that does not need to be compatible with Javascript semantics and is
by afiori 6y ago
They were developed with different goals. WebAssembly is a stripped down version of asm.js that does not need to be compatible with Javascript semantics and is slightly closer to the hardware. In particular it shares with Javascript a strong security model.
- mega-tux 6y agofrom website: WebAssembly (abbreviated Wasm) is a binary instruction format for a stack-based virtual machine. Wasm is designed as a portable compilation target for programming languages, enabling deployment on the web for client and server applications. asm.js an extraordinarily optimizable, low-level subset of JavaScript http://asmjs.org/ http://asmjs.org/ so, IMO WebAssembly is not a stripped down version of asm.js even if they sold it as that to js devs to foster adoption
- afiori 6y agoYes, you are correct. What I wanted to say is that webassembly is a continuation in that direction. At the time asm.js was ideated the alternative were browser plugins like NaCl, Flash, or Java. The problem with asm.js is that the requirement to be a subset of javascript meant that some optimizations were impossible. wasm is another step in that direction.