WebAssembly Makes its Entrance! Will it Become the New Standard of Tomorrow?

With the release of Firefox 52 the other day, Mozilla has released the first browser with WebAssembly support. This is a huge development in the web development community. While there is of course the influence in web development, there will likely be indirect effects in native app development as well.

What is WebAssembly?

WebAssembly is a means to compile and use code that was written in a language other than JavaScript in a web browser. Since the code is compiled, its execution time is quick like native code. While I did say other than JavaScript, WebAssemly’s purpose is not to replace JavaScript, but rather to run along side it. While there have been browser plugins for awhile, if it isn’t a plugin that you created yourself, then you are limited to the functionality that it already supports. If it is one you created, or even an existing one, your user must get your user to install it to utilize its functionality. With the two items mentioned above, there are some projects where using plugins is not even an option. Since WebAssembly is going to be adopted by all the major browsers, one can utilize WebAssembly without fear of the problems plugins face.

 

Why WebAssembly?

Javascript was originally created the mindset that it is just to complete simple tasks when it was released in 1995, but it has since evolved incredibly. Up until now, the largest influence in JavaScript speed was the introduction of the JIT Compiler (Just In Time Compiler). Released in 2008, the JIT Compiler recognized patterns and automatically compiled them. As a result, JavaScript’s exucution time became up to 10x as fast. However, as JavaScript is still a script language, compared to compiled languages, it still can’t be called fast. Using WebAssemly is considerably faster than JavaScript even with the JIT Compiler, so it is suitable when doing computation heavy algorithms or compression. This is a huge topic, but the structures of many services, as well as their flow may change considerably. For example, without installing the game, if one cane achieve the same performance as the downloaded version, then one can get away with not having a download server or patch system.

 

What is going to happen now?

Mozilla was concerned with how slow javascript was, so they sought something even faster than JIT compiler. With that, they started development on WebAssembly (at the time it was called asm.js). As a test, they decided to attempt to achieve near native levels of performance without the use of any plugins. The result was faster than they had imagined, so they decided to continue with development. In order to create a standard, they worked together with representitives from other browsers (chrome, safari, IE, Edge) and started to create a standard on February 28th. From here other browsers are said to implement WebAssembly as well.

WebAssembly demo video

 

 

Last Remark

With the release of WebAssembly, web development may slightly shift in a different direction. While it may still be a little ways off, if there becomes an infrastructure that is able to give unlimited internet access with a reliable signal to pretty much anywhere one would go in their daily life, then there may come a day when most applications can be created through web assembly without the worry of creating them specifically for a specific OS
or with a certain language.