Feeds

Mozilla vows Google 'Crankshaft' riposte

'Nobody puts Monkey in a corner'

Security for virtualized datacentres

Mozilla has vowed not to get "left behind" by Google's latest JavaScript engine, codenamed Crankshaft.

With a blog post on Wednesday, Mozilla's David Mandelin mused on Craftshaft's "adaptive compilation" design and said that the Mozilla JavaScript team and developer community "definitely have the skills and resources to enhance" Firefox's JavaScript engine in ways that match Google's work, and he indicated that this will begin after the release of Firefox 4, due early next year.

Today, at the annual Add-on-Con browser conference in Mountain View, California, Mozilla director of products Jay Sullivan told us that the open source outfit sees Crankshaft as yet another example of the major browser vendors pushing each other to improve JavaScript speed. "It's good. At the highest order, the competition continues," he said, after pointing us to Mandelin's blog post.

Mandelin compares Crankshaft to Firefox's existing TraceMonkey JavaScript engine extension. "I have to point out that run-time type specialization for JavaScript was pioneered by Mozilla’s TraceMonkey project," he said. But he also points out that Crankshaft takes the technique several steps further.

Crankshaft consists of four components. There's a base compiler as well as a run-time profiler that identifies hot code – code that's frequently used. Then an optimizing compiler recompiles the hot code to offer such optimizations as loop-invariant code motion, linear-scan register allocation, and inlining. Plus, Google's V8 team has included "deoptimization support", which identifies cases where the optimizing compiler has over-promised on speed improvements. In this case, the engine falls back on the base compiler.

"Crankshaft introduces an optimizing compiler that does complex optimizations, such as register allocation and loop-invariant code motion," as Mozilla's David Mandelin sees it. "These optimizations take time, so they would make startup slow if that was the only compiler. But Crankshaft also has a base compiler that starts fast but doesn’t optimize very much: probably less than the V8 compiler, in fact. Only if the code is predicted to run many times will it be compiled with full optimization."

With TraceMonkey, Mandelin says, Firefox's engine does something similar. But Crankshaft goes further. Unlike Crankshaft, he says, TraceMonkey just records a trace once – a trace being a code loop that gets reused. Crankshaft, it seems, profiles code repeatedly. It also seems that Crankshaft optimizes entire methods rather than just traces. And it uses inline caching.

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

Choosing a cloud hosting partner with confidence

More from The Register

next story
New 'Cosmos' browser surfs the net by TXT alone
No data plan? No WiFi? No worries ... except sluggish download speed
'Windows 9' LEAK: Microsoft's playing catchup with Linux
Multiple desktops and live tiles in restored Start button star in new vids
iOS 8 release: WebGL now runs everywhere. Hurrah for 3D graphics!
HTML 5's pretty neat ... when your browser supports it
Mathematica hits the Web
Wolfram embraces the cloud, promies private cloud cut of its number-cruncher
Google extends app refund window to two hours
You now have 120 minutes to finish that game instead of 15
Intel: Hey, enterprises, drop everything and DO HADOOP
Big Data analytics projected to run on more servers than any other app
Mozilla shutters Labs, tells nobody it's been dead for five months
Staffer's blog reveals all as projects languish on GitHub
SUSE Linux owner Attachmate gobbled by Micro Focus for $2.3bn
Merger will lead to mainframe and COBOL powerhouse
iOS 8 Healthkit gets a bug SO Apple KILLS it. That's real healthcare!
Not fit for purpose on day of launch, says Cupertino
prev story

Whitepapers

Providing a secure and efficient Helpdesk
A single remote control platform for user support is be key to providing an efficient helpdesk. Retain full control over the way in which screen and keystroke data is transmitted.
WIN a very cool portable ZX Spectrum
Win a one-off portable Spectrum built by legendary hardware hacker Ben Heck
Saudi Petroleum chooses Tegile storage solution
A storage solution that addresses company growth and performance for business-critical applications of caseware archive and search along with other key operational systems.
Protecting users from Firesheep and other Sidejacking attacks with SSL
Discussing the vulnerabilities inherent in Wi-Fi networks, and how using TLS/SSL for your entire site will assure security.
Security for virtualized datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.