@@ -234,29 +234,29 @@ PHP 8's JIT (Just-In-Time) compiler profiles execution paths and compiles hot by
234234
235235### Long-Running Workloads & Batch Processing (JIT Recommended)
236236
237- In long-running CLI scripts, batch jobs, and high-throughput production servers (PHP-FPM, FrankenPHP, Swoole, RoadRunner), ** JIT provides a 1.5 × to 4.8 × speedup** :
237+ In long-running CLI scripts, batch jobs, and high-throughput production servers (PHP-FPM, FrankenPHP, Swoole, RoadRunner), ** Tracing JIT ( ` opcache.jit=tracing ` , equivalent to ` 1254 ` ) provides a 2.0 × to 3.4 × speedup** , pushing full-mode validation past ** 3.6M ops/sec ** (benchmarked on PHP 8.5.12) :
238238
239- | Scenario (Full Mode) | Standard PHP (No JIT) | JIT (` tracing ` , 128M) | JIT ( ` 1254 ` , 128M) | JIT Speedup |
240- | :--- | :--- | :--- | :--- | :--- |
241- | ** Small ` list<int> ` ** (30 items, 10k calls) | 131 ms (75k ops/s) | 63 ms (158k ops/s) | ** 63 ms (158k ops/s)** | ** 2.0 × Faster** |
242- | ** Large ` list<int> ` ** (1,000 items, 10k calls) | 2,723 ms (3.6k ops/s) | 860 ms (11.6k ops/s) | ** 833 ms (12.0k ops/s)** | ** 3.0 × Faster** |
243- | ** Massive ` list<int> ` ** (100k items, 2k calls) | 88,557 ms (~ 88.5s) | 22,525 ms ( ~ 22.5s ) | ** 17,131 ms (~ 17.1s )** | ** 4 .8× Faster** |
244- | ** Array Shapes** (3 keys, 10k calls) | 182 ms (54k ops/s) | 62 ms (160k ops/s) | ** 51 ms (193k ops/s)** | ** 3.5 × Faster** |
245- | ** Unsealed Shapes** (4 keys, 10k calls) | 168 ms (59k ops/s) | 90 ms (110k ops/s) | ** 50 ms (199k ops/s)** | ** 3.3 × Faster** |
246- | ** Generic Map ` array<K, V> ` ** (50 items, 5k calls) | 295 ms (16k ops/s) | 148 ms (33k ops/s) | ** 71 ms (69k ops/s)** | ** 4.0 × Faster** |
239+ | Scenario (Full Mode) | Standard PHP (No JIT) | JIT (` tracing ` / ` 1254 ` , 128M) | JIT Speedup |
240+ | :--- | :--- | :--- | :--- |
241+ | ** Small ` list<int> ` ** (30 items, 10k calls) | 6.97 ms (1.43M ops/s) | ** 3.20 ms (3.12M ops/s)** | ** 2.2 × Faster** |
242+ | ** Large ` list<int> ` ** (1,000 items, 10k calls) | 53.5 ms (187k ops/s) | ** 18.7 ms (536k ops/s)** | ** 2.9 × Faster** |
243+ | ** Massive ` list<int> ` ** (100k items, 2k calls) | 881 ms (2.3k ops/s ) | ** 314 ms (6.4k ops/s )** | ** 2 .8× Faster** |
244+ | ** Array Shapes** (3 keys, 10k calls) | 6.57 ms (1.52M ops/s) | ** 2.75 ms (3.63M ops/s)** | ** 2.4 × Faster** |
245+ | ** Unsealed Shapes** (4 keys, 10k calls) | 8.96 ms (1.12M ops/s) | ** 4.32 ms (2.31M ops/s)** | ** 2.1 × Faster** |
246+ | ** Generic Map ` array<K, V> ` ** (50 items, 5k calls) | 11.3 ms (443k ops/s) | ** 3.32 ms (1.51M ops/s)** | ** 3.4 × Faster** |
247247
248- ### Recommended Production JIT Configuration (` opcache.jit=1254 ` )
248+ ### Recommended Production JIT Configuration (` opcache.jit=tracing ` / ` 1254 ` )
249249
250- In PHP's JIT configuration syntax (` CRTO ` ):
251- * ** ` C = 1 ` ** : CPU-specific architecture optimizations (SSE / AVX native instructions ).
252- * ** ` R = 2 ` ** : Global register allocation (keeps hot variables in hardware registers) .
253- * ** ` T = 5 ` ** : ** Tracing JIT** (profiles hot execution paths across function calls ).
254- * ** ` O = 4 ` ** : Aggressive loop unrolling and call inlining .
250+ In PHP's JIT configuration syntax (` CRTO ` ), ` opcache.jit=tracing ` is a built-in alias for ` 1254 ` :
251+ * ** ` C = 1 ` ** : CPU-specific optimizations (AVX instruction generation ).
252+ * ** ` R = 2 ` ** : Global linear-scan register allocation.
253+ * ** ` T = 5 ` ** : ** Tracing JIT** (profiles on the fly and compiles traces for hot code segments ).
254+ * ** ` O = 4 ` ** : Type inference and call-graph optimization .
255255
256256``` ini
257257opcache.enable =1
258258opcache.enable_cli =1
259- opcache.jit =1254
259+ opcache.jit =tracing
260260opcache.jit_buffer_size =128M
261261```
262262
0 commit comments