Friday, September 14, 2012

Firefox 18: JavaScript JIT IonMonkey speeds up performance

Firefox 18: JavaScript JIT IonMonkey speeds up performance:
When it comes to JavaScript performance, Google Chrome is the uncrowned king of the browser world. Google’s browser is dominating all other web browsers in every benchmark, be it in Google’s own Octane benchmark , Mozilla’s Kraken or any of the other benchmarks that test JavaScript performance.
Browsers like Firefox, Opera and even Internet Explorer have seen improvements as well in recent time, and gaps that have been wide open performance-wise are getting smaller with every browser release.
Mozilla today announced that it has activated the JavaScript JIT (Just in Time) IonMonkey in Firefox 18. Nightly users of the web browser benefit from large JavaScript performance gains thanks to the new compiler.  IonMonkey not only improves the browser’s JavaScript performance for users of the browser; the new engine furthermore gives Mozilla additional options to improve and optimize the engine furthermore which were not available previously.

SpiderMonkey has a storied history of just-in-time compilers. Throughout all of them, however, we’ve been missing a key component you’d find in typical production compilers, like for Java or C++. The old TraceMonkey*, and newer JägerMonkey, both had a fairly direct translation from JavaScript to machine code. There was no middle step. There was no way for the compilers to take a step back, look at the translation results, and optimize them further.
IonMonkey provides a brand new architecture that allows us to do just that

Mozilla engineer David Anderson has posted benchmarks which you can access when you follow the link above. According to his findings, Firefox 18 performed roughly 26% better on the Kraken benchmark than Firefox 17. On Google’s V8 benchmark, it was 7% faster than Firefox 17, and 20% faster than Firefox 15. Tests appear to have been conducted on a single desktop machine, and results may vary because of it.
firefox javascript 18
I ran Firefox 18, 17 and Google Chrome 23 Canary through the Octane and Kraken benchmarks with the following results.
Octane (higher is better):

  • Google Chrome 23: 12919

  • Firefox 17: 8502

  • Firefox 18: 8727


Kraken (lower is better):

  • Google Chrome 23: 2468.6

  • Firefox 18: 2069.9

  • Firefox 17: 2879.8


It comes as a surprise that Firefox 18 beats Chrome 23 in the Kraken benchmark. I reran the benchmark in Chrome just to make sure the results were correct, and Chrome finished in about the same time.
The Octane benchmark on the other hand was disappointing. A mere gain of 200 points in the benchmark looks more like a fluke than something that Firefox users will notice.
It remains to be seen how this will turn out in the following months when further improvements are made to the compiler.
It takes three release cycles before IonMonkey will be available to stable users of the browser. IonMonkey will also be enabled shortly for Firefox for mobile devices.

DIGITAL JUICE

No comments:

Post a Comment

Thank's!