WebAssembly: A new binary format to make web faster [wasm]

0
89

Microsoft, Google, Mozilla, Apple and many other major oragnizations teamed up together to participate in this new approach to make internet faster. How they are planning to achieve this? The answer is simple, yet complicated.

The new group – WebAssembly Community Group is organized to design a new bytecode to write web applications. ByteCode is actually a machine-readable instruction set that is faster for web browsers to load than high level language.

It is known that machine performs faster with Assembly language because they don’t need to translate the human readable instructions into machine understandable language. It allows computer to execute instructions efficiently and save considerable time to display output.

WebAssembly or wasm for short, is a new standard protocol and instruction set, which will allow developers to code browsers and web applications. The new format is meant to allow programmers to compile their code for the browser (currently the focus is on C/C++, with other languages to follow), where it is then executed inside the javascript engine.

Instead of having to parse the full code, though, which can often take quite a while (especially on mobile), WebAssembly can be decoded significantly faster.

WebAssembly team is working on a standard programming language which is based on bytecode for specific languages to design web applications. What this means, the encoding and decoding of webpages and web applications will be much faster because it won’t have to parse the whole source code to construct the output.

Mozilla and Microsoft offers very similar structure with their Asm.js  and TypeScript projects, which is a stripped version of the Javascript, to parse pages faster. Seeing them come together to build this web standard, is a step into internet of future.

Currently, only C and C++ code can be compiled into a WebAssembly (a.k.a wasm) file.
Moreover, the developers of wasm know that JavaScript is supported everywhere so for older web browsers, they are providing a polyfill — a JavaScript script that will convert WebAssembly bytecode into asm.js for those browsers that don’t support wasm.

As JavaScript inventor (and short-term Mozilla CEO) Brendan Eich points out today, once the main browsers support the new format natively, JavaScript and WebAssembly will be able to diverge again.

The whole project is still on the very early stage, and there is a lot of work to do but, with all the major four browser developers working together, wasm should appear soon.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.