Improved JavaScript Performance in Firefox 9

JavaScript is generally blamed for slowing down browsers and before Google’s V8 engine no browser vendor was actually interested in improving JavaScript performance. Thanks to V8 and HTML5, the JavaScript is again in the limelight and other browser vendors have been forced to work on their JS engines in order to stay in the competition.

Mozilla had announced JaegerMonkey, a new hybrid JIT compiler for its SpiderMonkey JavaScript engine. The JaegerMonkey was introduced with Firefox 4 release and it uses the similar approach as WebKit’s Nitro engine. Latest Nightly build of Firefox (Firefox 9) has got another improvement for JavaScript rendering. This new improvement is implementation of type inference in JaegerMonkey.

In short, the type inference infers missing type information during processing. According to ExtremeTech, this addition may boost up JavaScript rendering in Firefox by up to 30%. This means that the users will experience a faster browser.

firefox9-nightly-javascript-performance

IonMonkey: The Future

While the above type inference feature has landed in the nightly build and will be available to end users with the Firefox 9, Mozilla has started working on IonMonkey project. The IonMonkey is planned as the next generation JavaScript JIT for Mozilla platform. To be a competitor of Google’s Crankshaft, it will feature much more organized and explicit data structures typical of advanced compilers.