Microsoft, Google, Mozilla team to build a faster Web

18.06.2015
Web apps and pages may soon get a speed boost to rival the performance of native desktop and mobile applications, thanks to a new standards initiative from Microsoft, Google and Mozilla.

The work, WebAssembly, provides a way to compile the source code for the programmatic parts of Web applications so they can be processed by the browser more quickly.

"I think this is a good evolution trajectory of the Web platform to try and reach the performance ... of native languages on mobile devices," wrote IDC software development analyst Al Hilwa, in an e-mail. "I think it is early days but the Web platform is moving faster than ever these days and so everyone is paying more attention to these developments."

The technology could also facilitate a wide range of applications heretofore have been extremely difficult to run on the Web, such as rich online games, video editing and emulation of full desktop applications.

With WebAssembly, developers compose the program logic of their Web components using a language such as C or C++, and then compile it into a binary object that can be executed by the JavaScript engine on the browser.

WebAssembly's approach is a novel one given that to date most all the program logic that a browser runs is served in plain text. It is almost always JavaScript, except if it is composed using third party plug-ins such as Adobe Flash or Microsoft Silverlight.

WebAssembly's binary objects are smaller in size than plain JavaScript code, thereby speeding delivery times. For instance, loading the Web game AngryBots requires downloading about 19MB of plain text JavaScript code, but only 6.3MB when the code is rendered in binary form.

The browser's JavaScript engine can also execute the object file format more quickly than plain text, further speeding rendering times.

As Web applications grow more sophisticated, companies such as Google and Microsoft, among others, have both been working to equip JavaScript for more complex workloads.

Microsoft has released TypeScript, which is a superset of JavaScript that incorporates advanced features, such as static typing, that make it easier for developers to manage and refine complex codebases. The Google Web Toolkit provides developers with a way to write programs in Java, and then compile them to JavaScript.

Initially, WebAssembly will rely heavily on Mozilla's ASM.js, which is a subset of low-level JavaScript commands. Developers write their programs in C or C++ and then use a compiler to translate them into ASM.js code, which is recognized by all the browsers. Support for additional languages beyond C/C++ will be added in the future.

WebAssembly development is taking place as a community group of the World Wide Web Consortium (W3C), the standards body for the Web. The initial work was done privately by Google, Microsoft and Mozilla in a private effort to reach consensus on the basic outline of the technology. The development team has since moved the codebase to an open GitHub repository.

Joab Jackson covers enterprise software and general technology breaking news for The IDG News Service. Follow Joab on Twitter at @Joab_Jackson. Joab's e-mail address is Joab_Jackson@idg.com

Joab Jackson