Feeds

Mozilla answers Google's Crankshaft with IonMonkey

Another simian joins Firefox JavaScript engine

Boost IT visibility and business value

Mozilla is developing a new JIT compiler for SpiderMonkey – the Firefox JavaScript engine – aiming to provide a new set of JavaScript optimizations. Known as IonMonkey, this will be SpiderMonkey's third JIT, but Mozilla hopes to consolidate all its optimization work on the new platform.

"Our goal is to implement a new compiler to enable many new JavaScript optimizations," reads the IonMonkey page on the MozillaWiki. "In particular, IonMonkey will feature much more organized and explicit data structures typical of advanced compilers. This goal of being clean and flexible will be extremely important for future optimization work and experimentation."

The project is led by David Anderson and David Mandelin, who were instrumental in building the JaegerMonkey JIT that was added to Firefox 4. Anderson and Mandelin aim to at least match the speed of Firefox's Trace JIT and Google's Crankshaft JavaScript engine.

When Google first revealed Crankshaft last fall, Mandelin said that Mozilla's JavaScript team and developer community "definitely have the skills and resources to enhance" the Firefox engine in ways that rival Google's design, and he indicated that work would begin soon after the release of Firefox 4.

"Plenty to do after Firefox 4 comes out," Mandelin said . "In the words of David Anderson, 'The game’s back on'."

Crankshaft was inspired by Sun's Java HotSpot performance engine, the revamped Java virtual machine that arrived in 1999, according to an exchange between The Register and Google engineer Eric Kay in December. Google Chrome developer Lars Bak was the lead man on the Sun HotSpot team, and Crankshaft uses HotSpot-like "adaptive compilation", identifying important code and optimizing that code as needed.

This is also reminiscent of what Mozilla does with the TraceMonkey extension to its JavaScript engine. But TraceMonkey "traces" code, detecting loops and converting them to assembly code. It works in tandem with JaegerMonkey. When TraceMonkey doesn't apply, JaegerMonkey kicks in and converts entire methods into assembly.

IonMonkey will make use of the Type Interface project from Mozilla man Brian Hackett, an effort to work around JavaScript's untyped setup. "[Hackett's project] is a hybrid static and dynamic analysis that is able to pinpoint, for certain, the types for every variable and property in a JavaScript program. This allows you to remove all sorts of run-time checks and perform optimizations that would otherwise be impossible," Anderson tells Infoq.

Mozilla intends to share all its IonMonkey code across the x86, x64, and ARM platforms. ®

Build a business case: developing custom apps

More from The Register

next story
KDE releases ice-cream coloured Plasma 5 just in time for summer
Melty but refreshing - popular rival to Mint's Cinnamon's still a work in progress
Leaked Windows Phone 8.1 Update specs tease details of Nokia's next mobes
New screen sizes, dual SIMs, voice over LTE, and more
Mozilla keeps its Beard, hopes anti-gay marriage troubles are now over
Plenty on new CEO's todo list – starting with Firefox's slipping grasp
Apple: We'll unleash OS X Yosemite beta on the MASSES on 24 July
Starting today, regular fanbois will be guinea pigs, it tells Reg
Another day, another Firefox: Version 31 is upon us ALREADY
Web devs, Mozilla really wants you to like this one
Secure microkernel that uses maths to be 'bug free' goes open source
Hacker-repelling, drone-protecting code will soon be yours to tweak as you see fit
Cloudy CoreOS Linux distro declares itself production-ready
Lightweight, container-happy Linux gets first Stable release
prev story

Whitepapers

Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
Boost IT visibility and business value
How building a great service catalog relieves pressure points and demonstrates the value of IT service management.
Why and how to choose the right cloud vendor
The benefits of cloud-based storage in your processes. Eliminate onsite, disk-based backup and archiving in favor of cloud-based data protection.
The Essential Guide to IT Transformation
ServiceNow discusses three IT transformations that can help CIO's automate IT services to transform IT and the enterprise.
Maximize storage efficiency across the enterprise
The HP StoreOnce backup solution offers highly flexible, centrally managed, and highly efficient data protection for any enterprise.