Mozilla borrows from WebKit to build fast new JS engine

Mozilla's high-performance TraceMonkey JavaScript engine, which was first introduced in 2008, has lost a lot of its luster as competing browser vendors have stepped up their game to deliver superior performance. Firefox now lags behind Safari, Chrome, and Opera in common JavaScript benchmarks. In an effort to bring Firefox back to the front of the pack, Mozilla is building a new JavaScript engine called JägerMonkey.

The secret sauce that will drive Mozilla's new JavaScript engine engine into the fast lane is some code borrowed from Apple's WebKit project. Mozilla intends to bring together the powerful optimization techniques of TraceMonkey and the extremely efficient native code generator of Apple's JSCore engine. The mashup will likely deliver a significant boost in Firefox's JavaScript execution speed, making Mozilla's browser a formidable contender in the ongoing JavaScript speed race.

Mozilla's current JavaScript engine uses nanojit as its native code generator. Adobe originally developed nanojit to power Flash's ActionScript execution and released it under an open source software license in 2006. Mozilla and Adobe were going to use nanojit to build an ECMAScript 4 implementation called Tamarin, but the project was largely abandoned when ECMAScript 4 was shelved. Mozilla integrated nanojit into its existing SpiderMonkey engine and added tracing optimization to build TraceMonkey.

Mozilla's new JägerMonkey engine will continue to use nanojit for some things, but will rely on Apple's Nitro Assembler to generate efficient native code. This will allow JägerMonkey to benefit from the performance advantages of method-based just-in-time (JIT) compilation. JägerMonkey will also use tracing optimization to flatten out loops and speed up other kinds of execution paths that can benefit from further optimization. Mozilla says that this blend of technologies potentially offers the best of all worlds.

"The reason we're [building JägerMonkey] is that TraceMonkey is very fast for code that traces well, but for code that doesn't trace, we're stuck with the interpreter, which is not fast. The JägerMonkey method JIT will provide a much better performance baseline, and tracing will continue to speed us up on code where it applies," wrote developer David Mandelin a blog entry about the new engine.

The project is said to be at a relatively early stage of development and is not yet ready to be broadly demonstrated. Developers who want to have a look at the code can download it from Mozilla's version control repository. The current development status is described in a page at the Mozilla wiki.

Source: ars technica

Tags: browsers, Firefox, Mozilla

Add comment

Your name:
Sign in with:
Your comment:

Enter code:

E-mail (not required)
E-mail will not be disclosed to the third party

Last news

A mobile hotspot in Australia will be capable of hitting gigabit speeds on the go
A new game could be in the works as Blizzard appears to have been hiring for a Diablo-related project
Nokia CEO Rajeev Suri will speak at MWC 2017
However what if you could go way, way back?
The Helio P15 packs an octa-core Cortex-A53 processor clocked at 2.2GHz
Samsung claims up to 27-percent higher performance or 40-percent lower power
Preliminary data for October shows another Windows 10 boom
Samsung Galaxy TabPro S - a tablet with the Windows-keyboard
The first Windows-tablet with the 12-inch display Super AMOLED
June 7, 2016 /
Keyboards for iOS
Ten iOS keyboards review
July 18, 2015 /
Samsung E1200 Mobile Phone Review
A cheap phone with a good screen
March 8, 2015 / 4
Creative Sound Blaster Z sound card review
Good sound for those who are not satisfied with the onboard solution
September 25, 2014 / 2
Samsung Galaxy Gear: Smartwatch at High Price
The first smartwatch from Samsung - almost a smartphone with a small body
December 19, 2013 /
HP Slate 7 is a 7-inch Android 4 Tablet PC with good sound
A cost-effective, 7-inch tablet PC from a renowned manufacturer
October 25, 2013 / 4

News Archive



Do you use microSD card with your phone?
or leave your own version in comments