Tuesday, 7 July, 2015 UTC


Summary

The JavaScript ecosystem is evolving in several promising ways. There have been mainstream standards advancements like the recent approval of ECMAScript 2015, as well as early-stage experiments like Strong Mode, to name a few. Balancing the needs of these new directions demands a flexible just-in-time compiler, and we've been hard at work on a brand new compiler for V8, codenamed "TurboFan." Since Chrome 41, TurboFan has been enabled for certain types of code, speeding up traditional content as well as improving performance for new language features.

TurboFan was built from the ground up with many unique capabilities in mind. It optimizes more code than the previous optimizing compiler, supports flexible and dynamic optimization modes, and enables easier contributions and maintenance. Thanks to these features and more, we've turned on TurboFan for some types of code that were challenging for our previous compiler to optimize, such as asm.js, class literals, with scopes, computed property names and for-of loops. TurboFan already shows promising performance results, including a 29% increase on the zlib score of the Octane benchmark.


Over the coming months, we expect to enable TurboFan for more and more types of JavaScript, with the eventual goal of entirely replacing our existing CrankShaft compiler. As it rolls out, developers' code will automatically get these free speedups with no changes needed. Stay tuned for future progress.

Posted by Ben L. Titzer, Software Engineer and TurboFan Mechanic