BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Both IE and Chrome Are to Support asm.js

Both IE and Chrome Are to Support asm.js

This item in japanese

Bookmarks

The modern.IE Platform Status indicates that now asm.js is in Development. According to Microsoft, the Chakra engine in Windows 10 will support asm.js, and Microsoft has been collaborating with Mozilla to implement it faster. Chrome is going to support it via TurboFan, a new optimizing compiler for V8.

Microsoft mentioned the users’ desire expressed through the IE Platform Suggestion Box as one of the main reasons for supporting asm.js. Mozilla’s technology is currently the 5th most requested feature for IE, but ironically enough, the suggestion for using Blink instead of Trident is #3 in users’ preferences for new features, and Dart VM is #8. But the users won’t get all they want, at least not for now, because instead of using Blink Microsoft recently announced Spartan.

When Mozilla and Epic Games decided to make the Unreal Engine run in the browser via asm.js back in 2013, a Chromium team member opened Issue #2599 on V8 as a feature request for Chrome to support asm.js. The issue stayed dormant for quite a while, but recently it has been moved to Assigned, being solved through the new V8 optimization compiler called TurboFan. The V8 team started working on it some time last year, but it recently entered beta in Chrome 41, according to Ben Titzer, tech lead on the V8 team:

We're already beta testing TurboFan in Chrome 41, which significantly improves the performance of numeric code like asm.js. There are additional heuristics and optimizations that are coming, so we are hesitant to close this issue [#2599] as "Fixed", but one could consider this issue "Mostly fixed".

We are actively experimenting with the policy to activate TurboFan, and one signal is the "use asm" directive. In response to #73 w.r.t. AOT, currently V8 does not use TurboFan to compile an entire asm.js module at a time.

asm.js provides a way to run native code written in C, C++ or other languages in the browser. asm.js contains a strict subset of JavaScript –strictly typed integers, floats, arithmetic, function calls, and heap accesses - that can be optimized for speed. It remains to see what will happen to PNaCl, Google’s solution for running native code in the browser. Initially, PNaCl outperformed asm.js but we haven’t heard much about it lately.

More on asm.js and PNaCl can be read in this InfoQ story.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT