Asm.js Will Soon Be Enabled By Default In Microsoft Edge

Microsoft may have lagged behind when it came to making Internet Explorer a competitive option compared to Chrome and Firefox, but with Edge it’s catching up — fast. The latest improvement is the implementation of asm.js into Edge’s Javascript engine, which came in a few months ago as an optional extra, but will soon be switched on by default.

According to Martin Brinkmann over at gHacks, the latest Windows Insider build incorporates the permanent activation of asm.js in Edge, which means it’ll appear in stable builds sooner rather than later.

For consumers, certain Javascript powered web apps will be faster. For developers, it makes targeting asm.js a more attractive decision. Why it’s particularly good for Windows is that universal and WebView apps could see a speed boost also.

If you’re using Edge to debug asm.js, you’ll be happy to know Microsoft has gone a step further: the browser’s developer tools will better cooperate with optimised code:

Debugging asm.js can be challenging due to the differences between the internal representation of asm.js optimized code and non-asm.js/normal JavaScript code. Currently, all browsers treat asm.js as normal JavaScript code when an in-browser debugger is attached. To help understand the actual asm.js code behavior, we enhanced the F12 developer tools to allow developers to choose running scripts with asm.js optimizations on and still be able to see console messages and exceptions by explicitly disconnecting the debugger.

In an effort to spice up the news, Microsoft put together an example using the Stockfish Chess engine. Two instances of the engine are pitted against one another, with one implementation asm.js optimised. Turns are limited to 200ms (though this value can be tweaked in the demo), so the faster the instance can run, the more moves it can evaluate.

Supercharging JavaScript performance with asm.js [Microsoft, via gHacks]