WebAssembly

Seeing how popular and effective Asm.js was, at some point it became clear to everyone that - what the browser browser really needs, is a native yet portable format. Most developers were happy with Asm.js, but the performance was undeniably far below what could be achieved. The best would be if all the browser vendors agreed on a common binary format, one that was properly documented, evolved and that compiler makers could target. JavaScript is fun, but there is a reason people use compilers like Quartex Pascal, namely to speed up development and avoid a codebase of 10.000.000 lines of raw JavaScript (and a myriad of frameworks, all of them incompatible with the other).
The result of this endeavor was WASM, an abbreviation for WebAssembly.
Unlike Asm.js, WebAssembly is handled by the browser itself. It is a pre-compiled binary format (bytecodes) that the browser loads and immediately converts to machine-code. This is a big deal, because the entire module is 100% guaranteed to be converted into native code. It's not like vanilla JavaScript where some segments are JIT compiled, while others remain interpreted.
Nor is it like Asm.js where the interpreter is written in JavaScript, and is thus subject to the JSVM and how it schedules execution.
WebAssembly is not executed by the ordinary JavaScript runtime engine at all, but is handled by a separate module and executed as a separate thread.
There are some speed penalties involved, namely when you call out from the WebAssembly module and into the DOM. Those calls are costly, which is why most WebAssembly development is about libraries, not full applications. A full WebAssembly application would be faster, but only for things that doesn't involves the DOM or HTML Elements. But writing WebAssembly libraries can definitively boost your code and product value.
Node.js likewise support and executes WebAssembly, opening up for some interesting solutions. You have all the perks of native code, but also a universal, binary format that runs and behaves identically across platforms and chipset architectures.
Compilers you can use to generate WebAssembly are:
- TypeScript
- Clang C/C++
- Rust
- GoLang
- Swift
I strongly urge you to use clang. There is an online IDE for clang, where the clang compiler itself has been compiled to WebAssembly (yeah, it can get confusing). So you actually dont need to install clang on your computer to write WebAssembly modules.
Check out the online IDE here: https://tbfleming.github.io/cib/