What is PHP8 JIT compiler

 JIT (Just in Time) compiler in PHP works the same as in the other interpreted programming language. It runs after the program starts and compiles code on the fly (at the runtime).

In PHP8 JIT will omit Zend VM and if the compiled code is already cached it is sent directly to the CPU. It will not depend on C language and the language will get ability to develop its own new features.


What is PHP8 JIT compiler

JIT in PHP8 is not a game changer in performance. It will improve it slightly, but not as significantly as PHP7 did. There are already some benchmarks showing that the performance in basic benchmarks (CPU intensive tasks) is much better, but in real-use applications it doesn't change much.

Article about JIT performance

CPU intensive tasks:

Results of fresh laravel webpage:

  • PHP 7.3: 131.37 req/s
  • PHP 8.0 + JIT: 133.57 req/s

Relative JIT contribution to PHP 8 performance source 




What is PHP8 JIT compiler




Comments