Feeds

Mozilla answers Google's Crankshaft with IonMonkey

Another simian joins Firefox JavaScript engine

Top three mobile application threats

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. ®

Maximizing your infrastructure through virtualization

More from The Register

next story
NO MORE ALL CAPS and other pleasures of Visual Studio 14
Unpicking a packed preview that breaks down ASP.NET
Captain Kirk sets phaser to SLAUGHTER after trying new Facebook app
William Shatner less-than-impressed by Zuck's celebrity-only app
Apple fanbois SCREAM as update BRICKS their Macbook Airs
Ragegasm spills over as firmware upgrade kills machines
Cheer up, Nokia fans. It can start making mobes again in 18 months
The real winner of the Nokia sale is *drumroll* ... Nokia
Mozilla fixes CRITICAL security holes in Firefox, urges v31 upgrade
Misc memory hazards 'could be exploited' - and guess what, one's a Javascript vuln
EU dons gloves, pokes Google's deals with Android mobe makers
El Reg cops a squint at investigatory letters
Chrome browser has been DRAINING PC batteries for YEARS
Google is only now fixing ancient, energy-sapping bug
Google shows off new Chrome OS look
Athena springs full-grown from Chromium project's head
prev story

Whitepapers

Top three mobile application threats
Prevent sensitive data leakage over insecure channels or stolen mobile devices.
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.
Top 8 considerations to enable and simplify mobility
In this whitepaper learn how to successfully add mobile capabilities simply and cost effectively.
Application security programs and practises
Follow a few strategies and your organization can gain the full benefits of open source and the cloud without compromising the security of your applications.
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.