Skip to content

VM: the 1M-iteration loop still takes 218 s and fibo(30) still times out at 300 s after the "VM hot path" PRs; boot is 0.99 s after the opcache flag — the O(scope²) scans and lazy builtin registration did not land (lib/VM.php, lib/Block.php, lib/ExtensionRegistry.php) (re-#36207, re-#36206) #36411

Description

@PurHur

Category

Regression: · closed-but-not-done, the interpreter · child of #36379

Problem (master 1edb103c34, pinned image, source script/php-env.sh so the new opcache flags apply)

2026-09-01 2026-09-02 Zend
php bin/vm.php hello.php 1.15 s 0.99 s 0.05 s
1M-iteration for loop 207.6 s 218.4 s 0.01 s
fibo(30) > 300 s > 300 s 0.13 s

#36207 closed via three PRs ("skip opcode-loop preamble work on hot paths", "storage reverse-index, argRecv cache", "memoize Block scope-slot lookups at runtime") whose combined effect on the issue's own probe is zero (within noise). #36206 closed with the opcache flag (1.15 → 0.99 s) — the lazy registration of 2,629 builtin objects, the harness spawn changes and the stream_select drain were not delivered. The compliance suite is therefore still ~4 h, and the VM is still unusable as a benchmark or fuzzing oracle.

PHP implementation target

Profile before touching code: php -d opcache.enable_cli=1 -r with pcntl_alarm sampling (the recipe in docs/AGENT-HANDOVER-2026-08-17.md) on the 1M loop; the top frames must be named in the PR. The audit's candidates remain: Block::isNamedVariableSlot/operandForScopeSlot per operand per op (lib/Block.php:1260/:1555), Context::globalNameForStorage per slot write (lib/VM/Context.php:877), MemoryAccounting::noteBytes getenv per string write, the per-op preamble (lib/VM.php:4640-4659), frame-per-block (Block::getFrame). Acceptance is the probe, not the PR count.

Done when

  • 1M loop < 10 s and fibo(30) < 60 s under bin/vm.php (numbers pasted); boot < 0.3 s with lazy registration
  • script/compliance-baseline.sh --diff --suite=VMTest no regressions; serial VMTest wall time recorded before/after

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

    IMPORTANTCritical patharea:vmVirtual machinebugSomething isn't workingimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-0:FoundationPhase 0 – foundation & DevEx

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions