PHP theorytheory 0/50 · 0%
Performance · hard

39. JIT Compilation

Just-in-time compiled PHP.

PHP 8.0 introduced a JIT (Just-In-Time) compiler as part of OPcache, translating hot bytecode paths into native machine code at runtime for CPU-bound workloads. It's configured via opcache.jit and opcache.jit_buffer_size in php.ini.

JIT provides the biggest wins for CPU-intensive numeric/computational code; typical I/O-bound web applications (dominated by database and network calls) see comparatively modest improvements from JIT alone.

Check your understanding

  1. 1. Which PHP version introduced the JIT compiler?

  2. 2. JIT provides the largest benefit for which type of workload?