This form logs you into your management portal account. To access your help desk account, click here and use the form to the right of the news.
The web has come a long way since the early days of JavaScript. When it was first introduced, JavaScript performance was barely adequate even for the trivial applications of the day. Then the browser performance wars happened, JavaScript got JITs, and performance improved by orders of magnitude. But to make the next step towards the future of the web, we’re going to need something even faster. In 2017, it looks like WebAssembly is the best bet to fill that role — particularly now that with the forthcoming release of Safari 11, all major browsers support WebAssembly.
New front-end technologies like WebAssembly will work together with the flexible modern backend infrastructure provided by advanced cloud hosting platforms to support web applications that are more complex than today’s single page applications and are able run with near-native performance.
In a nutshell, WebAssembly is a bytecode for the browser. Historically, JavaScript was the only language that ran natively in the browser. Modern JavaScript is a fine programming language, but there are limitations inherent to the way JavaScript works that impose a ceiling on performance optimization.
JavaScript is a language written for humans, whereas WebAssembly is written for machines. JavaScript performance optimization depends on Just In Time compilation and on-the-fly optimization, whereas with WebAssembly, much of the optimization happens in the compile phase, before the code ever hits the browser. WebAssembly is much easier for the browser to parse than JavaScript. Additionally, WebAssembly is designed to be more compact than equivalent JavaScript code, which means there’s less for the browser to download.
One of the major benefits of WebAssembly is that it’s a compile target, not a language intended to be written by humans. Developers will write code in languages like C and Rust, or any other language capable of targeting WebAssembly or an intermediate format like that of LLVM.
Many of the most exciting forthcoming technological innovations will rely on a web that’s faster than JavaScript alone can support. Virtual Reality and Augmented Reality in particular will place huge performance demands on browsers, and if the web is going to play a part in VR and AR, WebAssembly will see wide-scale adoption.
But that doesn’t mean JavaScript is going away. Most web development is likely to be based on JavaScript for the foreseeable future. It’s the language web developers are familiar with and there’s no real reason to write the majority of web applications in languages like C when JavaScript is up to the job.
In fact, even those applications that leverage the benefits of WebAssembly will still use JavaScript. At the moment, WebAssembly is loaded into web pages via JavaScript, and relies on JavaScript to make calls to web APIs. It’s likely that many web developers will leverage high-performance WebAssembly modules in the their JavaScript applications when the best possible performance is required.
It might be a while before we’re all writing our web applications in WebAssembly, but I’d encourage web developers to familiarize themselves with the technology, because it’s going to be a key part of the most advanced web applications in years to come.
Comments (0)
Leave a Comment