I have been reading about asm.js and WebAssembly recently:
http://ejohn.org/blog/asmjs-javascript-compile-target/
https://brendaneich.com/2015/06/from-asm-js-to-webassembly/
I am still confused about a few things:
asm.js is a subset of JS with "highly optimizable" instructions. Basically you can declare the type (int, float) and the js engine (in the browsers but also the node.js one) will execute the instructions faster. It has benefits if your app does a lot of calculation or graphic if used together with WebGL.
web assembly is a binary format for JS, all JS, not only asm.js. It's not a bytecode, it's a binary encoding of the AST that the parser calculates. It has 2 big benefits:
We already can write code for browsers that isn't JS: EMSCripten can compile c++ code in JS code. Other transcompiler are already available to compile your code into JS. Using asm.js that code can run faster when it does math. Using web assembly that code will be more compact and the browser will be able to process it faster (because it will be able to skip the parsing). You won't have a new plugin to load like DirectX, JavaApplets, Flash or Silverlight because everything will run in the JS sandbox.