JavaScript is pretty slow compared to most compiled languages; WASM's aim is to create a new language that C/C++ can compile to that browsers can understand that's super fast which will open the doors for more advance things in the browser. WebGL for example can do so much better if the JavaScript could be replaced with something faster.
Once C/C++ is supported, the plan is to implement garbage collection so that other languages like Java / C# can also compile to something that can be run in the browser. My guess is JavaScript will also eventually compile to WASM or at least have hooks into WASM via ASM.js.
From the discussions on the Dart mailing lists, WASM is still very far away and will be slowed down many more years by the usual browser adoption problem.
asm.js is an intermediate programming language designed to allow computer software written in languages such as C to be run as web applications while maintaining performance characteristics considerably better than standard JavaScript, the typical language used for such applications.
asm.js consists of a strict subset of JavaScript, into which code written in statically-typed languages with manual memory management (such as C) is translated by a source-to-source compiler such as Emscripten (based on LLVM).[2] Performance is improved by limiting language features to those amenable to ahead-of-time optimization and other performance improvements.
Jan Vladimir Mostert
Idea Incubator
JavaScript is pretty slow compared to most compiled languages; WASM's aim is to create a new language that C/C++ can compile to that browsers can understand that's super fast which will open the doors for more advance things in the browser. WebGL for example can do so much better if the JavaScript could be replaced with something faster.
Once C/C++ is supported, the plan is to implement garbage collection so that other languages like Java / C# can also compile to something that can be run in the browser. My guess is JavaScript will also eventually compile to WASM or at least have hooks into WASM via ASM.js. From the discussions on the Dart mailing lists, WASM is still very far away and will be slowed down many more years by the usual browser adoption problem.