This is an awesome idea.

This is an awesome idea. It’s still just JavaScript so its backward compatible, but it avoids all of the parts of JS that are hard to optimize. The backward compatible aspect gives it a huge advantage over NaCl.

Originally shared by Ian Bicking

asm.js is a subset of Javascript, as a kind of defined target for compilation.  In other words, it’s the Javascript you should create if you are compiling C or C++ code to Javascript (which, if you didn’t realize it, you can already do: http://emscripten.org/)

The promise for projects that compile to the asm JS subset is something around half the speed of C, maybe better.  This is a direct competitor to NaCl (https://developers.google.com/native-client/) which is Google’s native binary runtime for Chrome.

This and maybe a handful of other smaller features could make Javascript a Good Enough VM.

http://asmjs.org/spec/latest/