Skip to content

Faster handling of enums with lots of cases - #6160

Merged
staabm merged 1 commit into
phpstan:2.2.xfrom
staabm:slow-export
Jul 31, 2026
Merged

Faster handling of enums with lots of cases#6160
staabm merged 1 commit into
phpstan:2.2.xfrom
staabm:slow-export

Conversation

@staabm

@staabm staabm commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

reproducer from phpstan/phpstan#14978

before this PR: ~3.32 seconds
after this PR: ~2.73 seconds

speedup lies in slow ConstantStrintType->export()

before profile
grafik


the PR here combined with #6116 will bring the reproducer down to ~1,4 seconds

@staabm
staabm marked this pull request as ready for review July 31, 2026 07:07
@phpstan-bot

Copy link
Copy Markdown
Collaborator

This pull request has been marked as ready for review.

@staabm
staabm requested a review from VincentLanglet July 31, 2026 07:10
@staabm
staabm merged commit 3c85eb2 into phpstan:2.2.x Jul 31, 2026
744 of 747 checks passed
@staabm
staabm deleted the slow-export branch July 31, 2026 07:59
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.

3 participants