In association with heise online

12 September 2012, 12:19

Mozilla turns on IonMonkey-boosted JavaScript JIT

  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

JavaScript The currently-in-development Firefox 18 has IonMonkey, a new JavaScript Just-In-Time (JIT) compiler, installed and activated for developers to test and refine. IonMonkey, compared to its predecessors, SpiderMonkey, TraceMonkey and JägerMonkey, has a completely new architecture, according to a post on the Mozilla JavaScript blog.

Where previous JITs directly translated JavaScript code into machine code, IonMonkey translates JavaScript code into an intermediate representation (IR), optimises that, and then translates the optimised IR code into machine code. This extra optimisation step should allow IonMonkey to look at the bigger picture when generating code, but there is a time penalty for performing this extra work. For that reason, the IonMonkey JIT will be used for long-running JavaScript applications while the current JägerMonkey JIT will be used for short-running programs.

Currently IonMonkey applies optimisations such as Loop-Invariant Code Motion (where instructions are moved out of loops where possible), Sparse Global Value Numbering (a form of redundant code elimination), Linear Scan Register AllocationPDF (for best register usage as used in Java's Hotspot and, until recently LLVM), Dead Code elimination (removing unused instructions) and Range Analysis (reducing or eliminating bounds checks). IonMonkey can already compile the IR code into x86, x86-64 and ARM thanks to the abstractions in the compiler architecture which minimised the code replication needed to support different CPUs.

According to Mozilla, the results for a long-lived app saw Firefox 17 running Mozilla's Kraken benchmark in 2602ms and the IonMonkey-boosted Firefox 18 running it in 1921ms. Testing at The H on an iMac system running Mac OS X 10.8 saw Firefox 18 complete Kraken in 1809ms, compared with the current development version of Chrome 23 which scored 2213ms. But, using Google's V8 benchmarks, where more points are better, the situation was reversed; Firefox 18 scored 8899 points but was well behind Chrome 23's 14364 points.

Firefox 18 will move out of nightly development releases and into the Aurora (alpha) channel on 8 October; it should enter beta on 20 November. IonMonkey is enabled by default on the desktop versions of Firefox 18 and should be enabled soon on the mobile Firefox nightlies.

(djwm)

Print Version | Send by email | Permalink: http://h-online.com/-1705233
 


  • July's Community Calendar





The H Open

The H Security

The H Developer

The H Internet Toolkit