Introduction
In our second benchmark, we saw a staggering PHP 8.5 JIT performance improvement of 110% on a pure CPU‑intensive script. But how does that translate to real‑world frameworks like WordPress, Laravel, and Symfony?
This question is critical for developers deciding whether to enable JIT in production. In this benchmark, we test PHP 8.5.2 with JIT on vs off across three scenarios:
- WordPress homepage – I/O‑bound (database queries, template rendering)
- Laravel CPU route –
fibonacci(30)calculation - Symfony CPU route – same CPU‑intensive task
All tests use the same server, same configuration, and follow industry best practices (warm-up, multiple runs, OPcache enabled).
Test Environment
| Component | Specification |
|---|---|
| CPU | Intel Xeon Platinum (4 vCores) |
| RAM | 8 GB ECC |
| OS | Ubuntu 24.04 LTS |
| Web Server | Nginx 1.24 |
| PHP Version | 8.5.2 (latest patch) |
| PHP‑FPM | Static processes, pm.max_children = 100 |
| OPcache | Enabled (required for JIT) |
| JIT Mode | Tracing (opcache.jit = tracing) |
| JIT Buffer Size | 256 MB (opcache.jit_buffer_size = 256M) |
| Database | MySQL 8.4.7 LTS, InnoDB buffer pool = 1G |
| WordPress Version | 6.7, default theme, 100 posts, 500 comments |
| Laravel Version | 11.x, custom CPU route |
| Symfony Version | 7.0, custom CPU route |
| Test Tool | Apache Bench (ab) |
| Concurrency | 1 (single request at a time) |
| Requests per Run | 1,000 |
| Warm‑up | 500 requests before each run |
Methodology
- Configure JIT disabled (
opcache.jit = disable), restart PHP-FPM - Run all tests (3 runs per scenario) – record
Requests per secondandTime per request - Configure JIT enabled (
tracing+ 256M), restart PHP-FPM - Wait 30 seconds for JIT warm-up
- Run all tests again (3 runs per scenario)
- Average results directly (runs were stable within ±2%)
- Verify all
Failed requests = 0in every run
Results
Table 1: WordPress Homepage (I/O‑bound)
| Test Run | JIT Disabled (req/s / ms) | JIT Enabled (req/s / ms) | Improvement |
|---|---|---|---|
| Run 1 | 9.04 / 110.596 | 9.03 / 110.789 | – |
| Run 2 | 9.02 / 110.889 | 9.05 / 110.557 | – |
| Run 3 | 8.90 / 112.392 | 9.03 / 110.706 | – |
| Average | 8.99 / 111.29 | 9.04 / 110.68 | +0.6% |
WordPress homepage is I/O‑bound – JIT offers minimal improvement.
Table 2: Laravel CPU Route (Compute‑intensive)
| Test Run | JIT Disabled (req/s / ms) | JIT Enabled (req/s / ms) | Improvement |
|---|---|---|---|
| Run 1 | 21.21 / 47.152 | 38.67 / 25.863 | +82% |
| Run 2 | 21.24 / 47.078 | 38.63 / 25.889 | +82% |
| Run 3 | 21.21 / 47.151 | 38.50 / 25.975 | +82% |
| Average | 21.22 / 47.13 | 38.60 / 25.91 | +82% |
These Laravel JIT benchmark results show JIT nearly doubles throughput on compute‑intensive Laravel tasks.
Table 3: Symfony CPU Route (Compute‑intensive)
| Test Run | JIT Disabled (req/s / ms) | JIT Enabled (req/s / ms) | Improvement |
|---|---|---|---|
| Run 1 | 21.58 / 46.329 | 42.04 / 23.784 | +95% |
| Run 2 | 21.63 / 46.227 | 42.06 / 23.774 | +94% |
| Run 3 | 21.60 / 46.291 | 42.03 / 23.791 | +95% |
| Average | 21.60 / 46.28 | 42.04 / 23.78 | +95% |
When comparing Symfony vs Laravel JIT gains, Symfony shows equally dramatic results, with throughput nearly doubling.
Key Findings
- PHP 8.5 JIT performance improvement: Up to 95% gain in compute‑intensive scenarios
- Laravel JIT benchmark results: 82% throughput increase (21.22 → 38.60 req/s)
- Symfony vs Laravel JIT gains: Both frameworks show 80-95% improvements, with Symfony slightly ahead at 95%
Analysis
The results clearly demonstrate where JIT matters and where it doesn’t:
| Application | JIT Disabled | JIT Enabled | Improvement |
|---|---|---|---|
| WordPress Homepage | 8.99 req/s | 9.04 req/s | +0.6% |
| Laravel CPU Route | 21.22 req/s | 38.60 req/s | +82% |
| Symfony CPU Route | 21.60 req/s | 42.04 req/s | +95% |
WordPress Homepage (I/O‑bound): JIT offers minimal improvement (0.6%). WordPress spends most of its time waiting for database queries and file operations. The bottleneck is not PHP execution.
Laravel & Symfony CPU Routes (Compute‑intensive): This is where JIT shines. Our Laravel JIT benchmark results show an 82% gain, while Symfony vs Laravel JIT gains are comparable, with Symfony achieving 95%. Together, they confirm the substantial PHP 8.5 JIT performance improvement for CPU‑heavy tasks. Response times are cut by nearly half.
The takeaway is clear: JIT is not a magic switch for every application. Its value depends entirely on your workload:
- I/O‑bound apps (most WordPress sites) → JIT offers little (<5% gain)
- CPU‑bound apps (APIs with heavy computation, data processing) → JIT delivers 80-95% gains
Should You Enable JIT?
Yes, always – but with realistic expectations.
| Application Type | Expected JIT Gain | Recommendation |
|---|---|---|
| WordPress Frontend | 0-5% | Enable – harmless, minimal impact |
| WordPress Admin | 5-10% | Enable – helps with complex pages |
| Laravel/Symfony API | 30-50% | Must enable |
| Custom CPU‑heavy Code | 50-100% | Must enable |
Why enable JIT even for WordPress?
- It rarely hurts performance
- Helps with background tasks (cron jobs, queue workers)
- Future-proofing – as WordPress evolves, it may leverage more CPU
JIT Configuration Best Practices
To get the most out of JIT:
php.ini
; Enable JIT with tracing mode
opcache.jit = tracing
; Allocate enough buffer – 256M recommended
opcache.jit_buffer_size = 256M
; Ensure OPcache is enabled
opcache.enable = 1After configuration:
- Restart PHP-FPM
- Verify with
phpinfo()– search foropcache.jit - Run warm-up requests (500+) to let JIT identify hot paths
Frequently Asked Questions
A: Modern frameworks have more CPU‑intensive routing, middleware, and service container logic. WordPress is dominated by database queries.
A: At least 256M for meaningful gains. Too small, and JIT won’t activate.
A: Rarely, but test in staging first. Some old extensions may not be compatible.
A: Monitor your server’s CPU usage. If it’s consistently high (>70%), JIT will help. If it’s waiting on I/O, JIT won’t change much.
Test Scripts (for Reproducibility)
Important: Run these commands only on your own isolated test server.
bash
# WordPress homepage
ab -n 1000 -c 1 https://phpbenchlab.com/:8084/
# Laravel CPU route
ab -n 1000 -c 1 https://phpbenchlab.com/:8085/cpu-test
# Symfony CPU route
ab -n 1000 -c 1 https://phpbenchlab.com/:8086/cpu-test
# Verify JIT status
curl https://phpbenchlab.com/:8084/info.php 2>/dev/null | grep opcache.jitLaravel Test Route (routes/web.php)
php
<?php
use Illuminate\Support\Facades\Route;
Route::get('/', function () {
return view('welcome');
});
Route::get('/cpu-test', function () {
function fibonacci($n) {
if ($n <= 1) return $n;
return fibonacci($n-1) + fibonacci($n-2);
}
$result = fibonacci(30);
return response('OK');
});Symfony Controller (src/Controller/BenchmarkController.php)
php
<?php
namespace App\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class BenchmarkController
{
#[Route('/cpu-test', name: 'cpu_test')]
public function cpuTest(): Response
{
function fibonacci($n) {
if ($n <= 1) return $n;
return fibonacci($n-1) + fibonacci($n-2);
}
$result = fibonacci(30);
return new Response('OK');
}
}Conclusion
This benchmark confirms that JIT’s impact is highly workload‑dependent:
While JIT shines in CPU-heavy Laravel routes, it’s a different story under I/O load. See our JIT performance under I/O latency test for a complete four-environment comparison with slow databases.
- For I/O‑bound applications like WordPress frontend, JIT offers minimal gains (<5%)
- For compute‑intensive tasks in frameworks like Laravel and Symfony, our Laravel JIT benchmark results and Symfony vs Laravel JIT gains confirm that JIT delivers 80-95% performance improvements – effectively doubling throughput. This represents a significant PHP 8.5 JIT performance improvement over JIT‑disabled configurations.
Final recommendation:
- Enable JIT on all PHP 8.5 servers – it’s safe and helps in many scenarios
- Configure correctly – 256M buffer, tracing mode
- For CPU‑heavy applications, JIT is non‑negotiable – you’re leaving massive performance on the table if it’s disabled
The days of PHP being “slow” are over. With PHP 8.5 and JIT, the language competes with compiled runtimes on CPU‑intensive tasks while maintaining its legendary ease of development.
All raw data and methodology are provided. Reproduce this benchmark on your own hardware to validate results.
Admiring the time and effort you put into your website and in depth information you offer.
It’s great to come across a blog every once in a while that isn’t the same outdated rehashed material.
Excellent read! I’ve saved your site and I’m adding your RSS
feeds to my Google account.
Hello there! Quick question that’s entirely off topic.
Do you know how to make your site mobile friendly?
My blog looks weird when browsing from my iphone.
I’m trying to find a template or plugin that might be able to resolve this
problem. If you have any recommendations, please share.
Thanks!
You need to learn some CSS and HTML.