Serious JavaScript performance boost for Firefox 3.1

Mozilla has just landed a new JavaScript optimization feature to Firefox 3.1 development code base (Shiretoko) that effectively enhances JavaScript-based web applications performance by a 2X – 20X fold compared to the already-severely-pumped-up Firefox 3, according to a variety of JavaScript performance tests ran and published by Mozilla’s Brendan Eich.

TraceMonkey tracks the JavaScript code your page is running, identifies pieces that are repeatedly used, and translates that code (interpreted) to an a machine ready state (compiled) that runs much faster the next time it is needed. As this repetitive executions (loops) are very common, the performance gains are huge.

But the best way to understand it is to see it in action. Mozilla’s VP of Engineering, Mike Schroepfer, created a simple JavaScript image editor that lets you adjust a picture’s contrast and brightness with a couple of sliders. With a today’s nightly and TraceMonkey disabled (currently the default as it is still buggy), there is a very noticeable delay while sliding. Turn it on (javascript.options.jit.content = true in about:config) and the thing works just as you would expect: smoothly.

Seems like Firefox 3.1, targeted for first quarter 2009, has just got its must-upgrade feature. With just a couple of months in the wild, Firefox 3 is already starting to look old.

For test details and TraceMonkey background, check Brendan Eich’s TraceMonkey: JavaScript Lightspeed.


  1. Carter August 23, 2008 1:34 pm 

    In what way do you think Firefox 3 is already starting to look old?

  2. Yeah August 24, 2008 3:07 am 

    Firefox 3 is also Firefox 3.1
    Firefox 3.0 =! Firefox 3.1

  3. Google Chrome joins Browser Wars II - Mozilla Links September 2, 2008 12:07 pm 

    [...] an open source JavaScript engine and virtual machine that uses optimization techniques similar to TraceMonkey (it compiles most commonly used code to avoid slow code interpretation).It also uses precise [...]

  4. Firefox 3 Alpha 2 reviewed - Mozilla Links September 5, 2008 10:11 pm 

    [...] TraceMonkey, the JavaScript optimization module that brings outstanding performance improvements to most web applications is not included in this release because of some nasty bugs, but is expected to be added soon. [...]

  5. Google Chrome Sucks – September 14, 2008 3:03 pm 

    [...] upcoming Firefox 3.1 will finally have private browsing, as well as a revamped tab switcher and the best JavaScript performance out there. It’s not over yet, kids. Age: 2 minutes and 44 seconds Tags: Android Apple AwesomeBar [...]

Comments are closed.