Feeds

Firefox engine outraces self after Jäger shot

SpiderMonkey amps up

3 Big data security analytics techniques

Mozilla has announced that JägerMonkey — the still-gestating JavaScript engine extension set to arrive with Firefox 4.0 this fall — is now faster than the TraceMonkey extension used by the current Firefox 3.6.

"JägerMonkey has crossed the streams," developer David Anderson said in a Tuesday blog post, boasting that the JägerMonkey performance line had passed TraceMonkey's when running the V8 benchmark suite. "It’s not by a lot, but this gap will continue to widen, and it’s an exciting milestone."

JagerMonkey performance

JagerMonkey (black) v TraceMonkey (orange) running the V8 benchmark

(Google's JavaScript engine is in green, at the bottom)

JägerMonkey is a method JIT compiler that uses the Nitro assembler from Apple’s open-source WebKit project, the same assembler used by Google Chrome and Apple Safari. The ultimate aim is to marry this compiler with TraceMonkey, Mozilla's trace JIT, so that Firefox can trace JavaScript code when it's appropriate but fall back on a method compiler when it's not.

Since unveiling the JägerMonkey project in late February, Anderson says, Mozilla has rewritten the extension from scratch. Anderson and team decided to retool the entire platform in early May, and by June they were ready to start optimizing again. The new version is now faster than the old.

Ultimately, Mozilla wants to offer a JavaScript engine that's at least as fast as the competition — if not faster. And Anderson hopes to match the competition even when tracing is not enabled.

At this point, the developers have yet to actually integrate JägerMonkey and TraceMonkey, and, well, they're not quite sure how this will work. "What about tracer integration? This is a tough one to answer, and people are really curious! The bad news is we’re pretty curious too — we just don’t know what will happen yet. One thing is sure: if not carefully and properly tuned, the tracer will negatively dominate the method JIT’s performance," Anderson writes.

"The goal of JägerMonkey is to be as fast or faster than the competition, whether or not tracing is enabled. We have to integrate the two in a way that gives us a competitive edge. We didn’t do this in the first iteration [of JägerMonkey, before it was rewritten]."

TraceMonkey speeds performance by detecting code loops and converting them into assembly language, a trick that Mozilla's competitors have yet to adopt. But there are times when such "tracing" doesn't work. "Loops can throw curveballs that cause tracing to stop," Anderson said in announcing JägerMonkey, aka JäegerMonkey and JagerMonkey and JaegerMonkey. "Especially with recursion, or lots of nesting, it can be very difficult to build good traces on complex code."

Currently, when this sort of thing happens, Firefox reverts to 2007. "When tracing fails, we have to fall back to our old-school interpreter. At that point your JavaScript runs about as fast as it would in 2007-2008 (i.e. before Firefox 3.5, Safari 4, Chrome, etc)," Anderson explained.

JägerMonkey is designed to solve this problem. TraceMonkey will work to convert loops, but when it can't, JägerMonkey will convert entire methods into assembly code. Both will operate under the aegis of SpiderMonkey, Mozilla's overarching JavaScript engine. Whereas JägerMonkey will use the Nitro assembler from WebKit, TraceMonkey uses its own native code assembler, known as nanojit.

Jagermonkey diagram

JägerMonkey borrows the Nitro assembler from WebKit

Anderson says the team hopes to have JägerMonkey ready by September 1. Firefox 4.0 is already in beta, and the official release is due in November. By September, Anderson says, "Integration with the tracing JIT must work, without degrading method JIT performance." ®

Top three mobile application threats

More from The Register

next story
Next Windows obsolescence panic is 450 days from … NOW!
The clock is ticking louder for Windows Server 2003 R2 users
This time it's 'Personal': new Office 365 sub covers just two devices
Redmond also brings Office into Google's back yard
Half of Twitter's 'active users' are SILENT STALKERS
Nearly 50% have NEVER tweeted a word
Ditch the sync, paddle in the Streem: Upstart offers syncless sharing
Upload, delete and carry on sharing afterwards?
Microsoft TIER SMEAR changes app prices whether devs ask or not
Some go up, some go down, Redmond goes silent
Batten down the hatches, Ubuntu 14.04 LTS due in TWO DAYS
Admins dab straining server brows in advance of Trusty Tahr's long-term support landing
Red Hat to ship RHEL 7 release candidate with a taste of container tech
Grab 'near-final' version of next Enterprise Linux next week
Windows 8.1, which you probably haven't upgraded to yet, ALREADY OBSOLETE
Pre-Update versions of new Windows version will no longer support patches
Inside the Hekaton: SQL Server 2014's database engine deconstructed
Nadella's database sqares the circle of cheap memory vs speed
prev story

Whitepapers

Mainstay ROI - Does application security pay?
In this whitepaper learn how you and your enterprise might benefit from better software security.
Combat fraud and increase customer satisfaction
Based on their experience using HP ArcSight Enterprise Security Manager for IT security operations, Finansbank moved to HP ArcSight ESM for fraud management.
The benefits of software based PBX
Why you should break free from your proprietary PBX and how to leverage your existing server hardware.
Top three mobile application threats
Learn about three of the top mobile application security threats facing businesses today and recommendations on how to mitigate the risk.
3 Big data security analytics techniques
Applying these Big Data security analytics techniques can help you make your business safer by detecting attacks early, before significant damage is done.