Overall, Crankshaft boosts V8's performance by 50% on the V8 benchmark suite. In addition to improving peak performance as measured by the V8 benchmark suite, Crankshaft also improves the start-up time of web apps such as GMail," explains Google.
Crankshaft has four main components:
- A base compiler compiler generates code quickly without heavy optimizations.
- A runtime profiler monitors the running system and identifies hot code, i.e., code that we spend a significant amount of the time running.
- An optimizing compiler recompiles and optimizes hot code identified by the runtime profiler.
- Deoptimization support allows the optimizing compiler to be optimistic in the assumptions it makes when generating code.