Skip to content

Add large payload bench - #311

Open
SerafimArts wants to merge 1 commit into
phpstan:2.3.xfrom
SerafimArts:feat/large-payload-bench
Open

Add large payload bench#311
SerafimArts wants to merge 1 commit into
phpstan:2.3.xfrom
SerafimArts:feat/large-payload-bench

Conversation

@SerafimArts

@SerafimArts SerafimArts commented Aug 30, 2026

Copy link
Copy Markdown

Please note that the phplrt implementation doesn't build an AST, as I didn't want to touch original grammar, which adds about 10% to the speed.

The PR only highlights regression and instability in the PHPStan type parser with increasing input payload size, as @ondrejmirtes requested.

Results (~14x times slower):

phplrt4: 961.932ms
phpstan: 13,201.727ms

P.S. In case of size increase (~28x times slower):

// - for ($i = 0; $i < 1000; ++$i) {
// + for ($i = 0; $i < 2000; ++$i) {

phplrt4: 1,941.367ms
phpstan: 54,044.375ms

etc.

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