Feeds

Mozilla vows Google 'Crankshaft' riposte

'Nobody puts Monkey in a corner'

Choosing a cloud hosting partner with confidence

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

Internet Security Threat Report 2014

More from The Register

next story
Preview redux: Microsoft ships new Windows 10 build with 7,000 changes
Latest bleeding-edge bits borrow Action Center from Windows Phone
Google opens Inbox – email for people too thick to handle email
Print this article out and give it to someone tech-y if you get stuck
Microsoft promises Windows 10 will mean two-factor auth for all
Sneak peek at security features Redmond's baking into new OS
UNIX greybeards threaten Debian fork over systemd plan
'Veteran Unix Admins' fear desktop emphasis is betraying open source
Entity Framework goes 'code first' as Microsoft pulls visual design tool
Visual Studio database diagramming's out the window
Google+ goes TITSUP. But WHO knew? How long? Anyone ... Hello ...
Wobbly Gmail, Contacts, Calendar on the other hand ...
DEATH by PowerPoint: Microsoft warns of 0-day attack hidden in slides
Might put out patch in update, might chuck it out sooner
Redmond top man Satya Nadella: 'Microsoft LOVES Linux'
Open-source 'love' fairly runneth over at cloud event
prev story

Whitepapers

Choosing cloud Backup services
Demystify how you can address your data protection needs in your small- to medium-sized business and select the best online backup service to meet your needs.
Forging a new future with identity relationship management
Learn about ForgeRock's next generation IRM platform and how it is designed to empower CEOS's and enterprises to engage with consumers.
Security for virtualized datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.
Reg Reader Research: SaaS based Email and Office Productivity Tools
Read this Reg reader report which provides advice and guidance for SMBs towards the use of SaaS based email and Office productivity tools.
Storage capacity and performance optimization at Mizuno USA
Mizuno USA turn to Tegile storage technology to solve both their SAN and backup issues.