Facebook Engineering Blog
Redesigning the HHVM JIT compiler for better performance

Redesigning the HHVM JIT compiler for better performance

9/22/2016 · Guilherme Ottoni

What this post added

This post details a major redesign of the HHVM JIT compiler, introducing profile-guided optimizations (PGO) to improve performance. The redesign involved transforming HHVM into a multi-gear system that uses a profiling gear to collect runtime execution data and an optimizing gear to recompile code into larger, more efficient regions. This approach overcomes the limitations of the previous tracelet-based compilation, enabling better optimization decisions and reducing overheads. The implementation was incremental, with initial improvements in 2014 and full support for arbitrary code regions by spring 2015, resulting in a 15% reduction in CPU usage.

Read the original post ↗