Firefox 22 adopts "asm.js", JavaScript speeds up to execution speed close to native application


ByNathan E Photography

The JavaScript engine installed in Firefox 22 scheduled to be released in June 2013OdinMonkey"Is a JavaScript subset that optimizes a JavaScript program so that it takes only about twice the execution time of the native code speed"Asm.jsIt was announced that it will be adopted. Firefox 22 which is already available at the momentNightly BuildIt is "on" by default, and you can experience how much you can speed up with various demos.

Asm.js in Firefox Nightly | Luke Wagner's Blog
https://blog.mozilla.org/luke/2013/03/21/asm-js-in-firefox-nightly/


Actually asm.js is what it saysFAQAlthough it is prepared, the explanation by the following slide is the easiest to understand.

Big Web App? Compile It!
http://kripken.github.com/mloc_emscripten_talk/#/19

This is a micro benchmark result, the numerical value is low and the shorter the graph is, the more excellent it is. The blue color is Firefox, the red color is Chrome, the green color is Firefox + asm.js, the orange color is the native application. As you can see, it marks overwhelming speed and it is almost twice as long as the execution time of native application.


The result of the realistic large benchmark assuming a more realistic situation is as follows and it means that the lower the number and the shorter the graph the better the outcome and the faster. As you can see, it's much faster than Google Chrome and it's running faster than native apps.


The biggest feature of this asm.js is that it takes about twice the execution time of the native code as you can see from the benchmark results to the previous. Moreover, it is not just a new VM or JIT, but it just adds optimization to existing JavaScript engine, so existing JavaScript code can be used as it is.


Just like a subset of JavaScript, it has already been confirmed that it works with all browsers, so it's definitely not a new language, so it's definite.


A bit more detail is clearly stated in the following entries and so on, asm.js itself need only to opt-in by writing "use asm" at the beginning of the file or at the beginning of the individual function, it is optimized in advance for each engine It will be so.

Asm.js: A Low Level, Highly Optimizable Subset of JavaScript for Compilers - Badass JavaScript
http://badassjs.com/post/43420901994/asm-js-a-low-level-highly-optimizable-subset-of

Asm.js: closing the gap between JavaScript and native
http://www.2ality.com/2013/02/asm-js.html

In other words, by incorporating this asm.js itself, Firefox will speed up, so it's quite possible to expect Firefox 22, which will be released this June.

in Software,   Web Service, Posted by darkhorse