This week in caching: OPcache vs the PHP 8 JIT
A comparison that trips up people chasing the shiny new flag:
— OPcache caches compiled bytecode and is the win for 99% of web apps — turning it off can halve throughput. Always on, always first.
— JIT compiles hot bytecode to machine code, but for typical I/O-bound web requests (DB, network) it adds near-zero gain and occasionally regresses.
— Where JIT actually pays: CPU-bound work — image processing, math-heavy loops, long-running CLI. Not your WordPress page render.
The practical move: max out opcache.memory_consumption and opcache.max_accelerated_files first, verify with opcache_get_status() that you're not evicting, then only test JIT if you're genuinely CPU-bound.
Bookmark: Brent Roose's PHP JIT benchmarks (stitcher.io) — honest numbers on where it helps and where it doesn't.
Cache Catch
@CacheCatch
This week in caching: OPcache vs the PHP 8 JIT
Этот пост опубликован в Telegram-канале Cache Catch. Подписаться можно по ссылке: @CacheCatch.