Category
Foundation: · performance program, measurement half · child of #36379
Why
benchmarks/ holds 7 programs from 2015 (fibo, Ack, mandelbrot, simple) and benchmarks/README.md's table is dated 2026-07-27 — it was not regenerated after wave 1 changed every number. script/bench-gate.sh (#36196) compares ratios for those 7 only. Nothing measures strings, arrays, objects, regex, JSON, templates, or a web request — the shapes the audit found 500x off. A compiler's performance claim is only as good as its benchmark suite.
Deliverable
benchmarks/v2/: nbody, spectral-norm, fannkuch-redux, binary-trees, fasta, k-nucleotide, regex-redux, json-roundtrip (encode/decode 10 MB), template-render (string building, 100k rows), assoc-heavy (100k string keys, lookups, array_*), object-graph (1M method calls + property access), sort-mixed, str-builder (.=, implode, sprintf), closure-heavy, exceptions (10k throw/catch), plus web-request (MiniWebApp / and /api/status via phpc fcgi, 2,000 requests, req/s and p99 vs php-fpm in the same image).
- Each program deterministic, output-verified against Zend before timing; VM / JIT / AOT columns, ratio to Zend, best-of-N with a per-run cap (no hangs).
benchmarks/history/<sha>.json appended by the nightly; docs/pages/bench.html renders the ratio history per program (sparkline); benchmarks/README.md table generated from the latest JSON only.
bench-gate baseline = the JSON of the last release tag; regression threshold 20 % per program, 10 % on the geometric mean.
Done when
Category
Foundation:· performance program, measurement half · child of #36379Why
benchmarks/holds 7 programs from 2015 (fibo,Ack,mandelbrot,simple) andbenchmarks/README.md's table is dated 2026-07-27 — it was not regenerated after wave 1 changed every number.script/bench-gate.sh(#36196) compares ratios for those 7 only. Nothing measures strings, arrays, objects, regex, JSON, templates, or a web request — the shapes the audit found 500x off. A compiler's performance claim is only as good as its benchmark suite.Deliverable
benchmarks/v2/:nbody,spectral-norm,fannkuch-redux,binary-trees,fasta,k-nucleotide,regex-redux,json-roundtrip(encode/decode 10 MB),template-render(string building, 100k rows),assoc-heavy(100k string keys, lookups,array_*),object-graph(1M method calls + property access),sort-mixed,str-builder(.=,implode,sprintf),closure-heavy,exceptions(10k throw/catch), plusweb-request(MiniWebApp/and/api/statusviaphpc fcgi, 2,000 requests, req/s and p99 vsphp-fpmin the same image).benchmarks/history/<sha>.jsonappended by the nightly;docs/pages/bench.htmlrenders the ratio history per program (sparkline);benchmarks/README.mdtable generated from the latest JSON only.bench-gatebaseline = the JSON of the last release tag; regression threshold 20 % per program, 10 % on the geometric mean.Done when
PHP_8_2=$(command -v php) php script/bench.php --v2regenerates the table in < 15 minbench-gatecovers v2 and is red on a deliberate 2x slowdownbenchmarks/README.mdno longer contains any hand-typed number