21 ms·
The fascinating thing about this is that they didn't write a new JIT for asm.js. It's just their existing JIT with more information and a few new tricks. Among
by cliffbean 13y ago
The fascinating thing about this is that they didn't write a new JIT for asm.js. It's just their existing JIT with more information and a few new tricks. Among other things, this means that it doesn't yet have a lot of the fancy optimizations that C/C++ compilers typically have in their backends, like clever instruction selection or register allocation. It's already impressively fast, and it has the potential to get even faster.
- ndesaulniers 13y ago> It's just their existing JIT with more information and a few new tricks. Spidermonkey is composed of the Baseline Compiler (JIT) and Ion Monkey (JIT), but a new AOT compiler was written, called "Odin Monkey."
- azakai 13y agoNot really a new compiler. OdinMonkey parses the asm.js type system, but then just passes the information it learned into IonMonkey, the existing SSA-optimizing JIT.
- ndesaulniers 13y agoHad to read up on that one! http://en.wikipedia.org/wiki/Static_single_assignment_form http://en.wikipedia.org/wiki/Static_single_assignment_form
- cliffbean 13y agoOdinMonkey uses the existing IonMonkey compiler to do the actual optimization and code generation work. This blog post has more information [0]; see especially the comments section where the author responds to some questions and discusses the relationship between OdinMonkey and regular JS compilation. [0] https://blog.mozilla.org/luke/2013/03/21/asm-js-in-firefox-nightly/ https://blog.mozilla.org/luke/2013/03/21/asm-js-in-firefox-n...
- ndesaulniers 13y agooh, interesting! Good eye, thanks for pointing this out!