Google vice president of product management Sundar Pinchai revealed the Craftshaft update this morning during a press event in San Francisco, before delaying the release of Chrome OS and unveiling a beta Chrome OS netbook dubbed the "Cr-48." A 32-bit Intel incarnation of Crankshaft is currently available with the "canary builds" of Chrome, the builds that precede even the developer versions of the browser.
The company is also working on ARM and x64 ports.
According to Pincai, with Craftshaft in place, Chrome is two to three times faster than the average web browser from just two years ago, and he claimed that compared with the 2008 incarnation of Microsoft Internet Explorer, it's one hundred times faster. "Something that took a minute to execute two years ago takes a second to execute today," Pinchai said.
Craftshaft uses what Pinchai calls an "adaptive compiler." In essence, this is designed to heavily optimize code that's regularly executed but to avoid much optimization with code that's not.
This begins with a base compiler that is, according to the company, twice as fast as the compiler used by the beta version of Chrome 9, and which generates 30 per cent less code. The engine also uses a "runtime profiler" to identify "hot code" — code that users spend a significant amount of time running — and then an "optimizing compiler" recompiles code that has been identified by the profiler. This uses "static single assignment form" compile design to offer such optimizations as loop-invariant code motion, linear-scan register allocation, and inlining.
At the same time, Google includes "deoptimization support," which will identify cases where the optimizing compile is over-promising. In these cases, the engine will then default back to the base compiler.
Given this setup, Google says, you may not see much of a performance improvement on SunSpider and other benchmarks that finish in just a few milliseconds.