Skip to content

Update phplrt-runtime to 4.2.4.1 - #6856

Merged
ondrejmirtes merged 1 commit into
2.3.xfrom
phplrt-runtime-4.2.4.1
Oct 26, 2026
Merged

ondrejmirtes merged 1 commit into
2.3.xfrom
phplrt-runtime-4.2.4.1

Conversation

@ondrejmirtes

Copy link
Copy Markdown
Member

Updates ondrejmirtes/phplrt-runtime from 4.2.4.0 to 4.2.4.1. The fork's build now applies build/interpreter.patch, which speeds up the recursive descent interpreter RegexParser runs on:

  • The tracer reads the buffer's tokens in place instead of calling ArrayBuffer::next()/seek().
  • An alternation that leaves nothing in the trace and is predicted to read a single production is read as that production, without a call.
  • Terminals a sequence requires are read in place.
  • TraceReducer::merge() is inlined into the reduction loop.

RegexParser on 626 regexes from the test suite, each whole and truncated, parsed 10 times:

4.2.4.0 4.2.4.1
Instructions (callgrind) 300M 282M (−6%)
Wall time, best run, no OPcache 282 ms 263 ms
Wall time, best run, OPcache 247 ms 236 ms

Parse results, including errors for the truncated regexes, are identical between both versions. NodeScopeResolverTest (1888 tests) and the regex type and rule tests pass locally.

The recursive descent interpreter is faster: about 6% fewer instructions when
parsing regexes, with identical results.

Amp-Thread-ID: https://ampcode.com/threads/T-01a17820-94d1-75c8-9206-2e802d9c0556
@ondrejmirtes
ondrejmirtes force-pushed the phplrt-runtime-4.2.4.1 branch from 9b8d6b2 to b203050 Compare October 26, 2026 21:04
@ondrejmirtes
ondrejmirtes merged commit eeee567 into 2.3.x Oct 26, 2026
1025 of 1026 checks passed
@ondrejmirtes
ondrejmirtes deleted the phplrt-runtime-4.2.4.1 branch October 26, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant