Skip to content

Regression: wave-1 codegen changes made mandelbrot time out (0.44 s → > 60 s, 51 s of it in the kernel) and simple 2x slower (0.23 → 0.50 s) — the bench gate exists but has never run because master CI is red (benchmarks/mandelbrot.php, script/bench-gate.sh, lib/JIT.php) #36407

Description

@PurHur

Category

Regression: · generated-code performance, introduced between 4eed6a2785 and 1edb103c34 · child of #36379

Problem (pinned image, same box, outputs verified)

program Zend 2026-09-01 4eed6a2785 2026-09-02 1edb103c34
benchmarks/mandelbrot.php 0.28 s 0.44 s > 60 s (timeout), user 7.6 s / sys 51.4 s, plus false warnings (#36405)
benchmarks/simple.php 0.09 s 0.23 s 0.50 s
fibo(30) 0.13 s 0.125 s 0.041 s (improved; July: 0.015 s)
Ack(3,8) 0.16 s 0.16 s 0.066 s (improved)
2M untyped calls 0.09 s 0.575 s 0.643 s

51 s of system time on a float loop means the binary is thrashing the allocator/kernel — allocating and freeing (or faulting) per iteration — which points at the new dtor/{main} ownership path (#36215/#36252, one of which was partly reverted: "Fix AOT function-scoped array append segfault — revert broken delref dtor/GC CFG") or the __value__ layout change (#36214) interacting with float boxes. simple's regression is call overhead (three 1M-call loops).

script/bench-gate.sh (#36196) would have flagged both — it is wired into compiler-gate.yml, which has not had a green run on master in its last 60 attempts (#36377, #36401). A gate that never runs is a gate that does not exist; 131 commits merged over it in 24 h.

PHP implementation target

Repro

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/compile.php -o build/mb benchmarks/mandelbrot.php && time timeout 60 ./build/mb > /dev/null; php bin/compile.php -o build/sp benchmarks/simple.php && time ./build/sp'

Done when

  • mandelbrot ≤ 0.3 s and simple ≤ 0.25 s under AOT in the pinned image (bench-gate rows pasted); no stderr output
  • Bisected commit named; a differential case pins the shape; script/differential-sweep.sh --aot --repeat 3 unchanged

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    MOST IMPORTANTThis are the most important targetsarea:compilerCompiler / CFG / JITbugSomething isn't workingimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-3:aotPhase 3 – AOT deployment

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions