Skip to content

Commit b640360

Browse files
alies-devdanog
authored andcommitted
Disable JIT by default, make it opt-in via --force-jit
Benchmarks across multiple platforms (Windows, Linux, macOS) and codebases consistently show JIT hurting Psalm performance by 5-35%. Additionally, JIT causes segfaults during taint analysis on certain platforms due to PHP core JIT bugs. Split opcache settings into base (always applied) and JIT-specific (only applied when --force-jit or forceJit="true" is set). This keeps opcache optimizations while avoiding JIT overhead and instability by default. Refs #11589, #11613
1 parent 3366d56 commit b640360

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Psalm/Internal/Cli/Psalm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,7 @@ private static function restart(
10131013
. 'You can enable JIT acceleration (experimental) with --force-jit.'
10141014
. PHP_EOL . PHP_EOL);
10151015
}
1016-
} else {
1016+
} elseif ($force_jit) {
10171017
$progress->write(PHP_EOL
10181018
. 'JIT acceleration: OFF (opcache not installed or not enabled)' . PHP_EOL
10191019
. 'Install and enable the opcache extension to use JIT with --force-jit.'

0 commit comments

Comments
 (0)