Sep 10, 2010 16:23 GMT  ·  By

The latest pre-Beta 6 Builds of Firefox 4.0 bring to the table a dramatic increase in performance associated with JavaScript. This because the new nightly builds offered by Mozilla earlier this week contain the next generation JavaScript engine for the open source browser, codenamed JägerMonkey.

Early adopters can now download Firefox 4.0 pre-Beta preview nightly Builds and start test diving JägerMonkey.

Still, users need to keep in mind that the releases are very early versions of Firefox 4.0 Beta 6, designed for testing and not for deployment into production environments.

Fact is that, Mozilla still has to merge all the JägerMonkey code into Firefox 4.0 in order to produce the fully fledged beta 6 of the browser.

“JägerMonkey is our new optimizing JIT compiler for JavaScript. It sits underneath our existing JIT, TraceMonkey, which appeared in Firefox 3.5,” revealed Mozilla’s David Anderson.

“JägerMonkey is a general-purpose compiler which converts entire methods to machine code. The goal is to get great baseline performance.

“When it detects a loop that can be traced, it automatically engages the trace compiler, which makes it even faster.”

Anderson explained that this is roughly the equivalent of having a turbo button inside the browser.

“This hybrid approach is designed to use well-established optimization techniques that work everywhere, and combine them with our existing hyper-optimizing engine that handles smaller subsets of code,” he explained.

The promise from the browser vendor is that testers will be impressed with the new JS performance delivered by Firefox 4.0.

Mozilla has already run some tests, and the results speak for themselves. Firefox 4.0 Beta with JägerMonkey wrapped up SunSpider 0.9.1 in just 304 milliseconds, twice as fast as Firefox 3.6 (621 ms) and certainoy faster than Firefox 3.5 (726 ms).

According to the results of the V8-v5 benchmark, Firefox 4.0 with JägerMonkey is four times faster than its predecessor with a score of 3,254 compare to just 738 for Firefox 3.6 and 561 for Firefox 3.5.

Anderson noted that “at the same time, here are some of the immediate performance works-in-progress:

1.Function Calls. This is one of our last big areas of optimization. The first of four major pieces, caching call sequences, was completed this week.

2.Tracer Integration. Right now we’re just scratching the surface, and we will have much better heuristics by the end of the month.

3.Web Optimizations.”

Firefox 4.0 Beta 5 for Windows is available for download here.

Firefox 4.0 Beta 5 for Mac OS X is available for download
here.

Firefox 4.0 Beta 5 for Linux is available for download
here.

Photo Gallery (2 Images)

Firefox 4.0
Firefox 4.0 JägerMonkey tests
Open gallery