Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve TypeCombinator::reduceArrays() perf with retained type compleness #1741

Merged
merged 1 commit into from Sep 23, 2022

Conversation

rvanvelzen
Copy link
Contributor

Improvement for phpstan/phpstan#7666. This sort-of depends on #1666 (or a similar solution) to keep arrays with many HasOffsetValueTypes more compact, which now do suffer from a perf loss.

The complex test cases that this mostly covers have become a bit slower, but still very manageable.

@rvanvelzen rvanvelzen changed the title Improve TypeCombinator::reduceArrays() perf with retained type compleness Improve TypeCombinator::reduceArrays() perf with retained type compleness Sep 22, 2022
@ondrejmirtes
Copy link
Member

I asked a question in #1666 - I wondered what the effect is when I already did something similar in e06f6f0 - I'd be fine if you reverted my commit in your PR, but I don't think we need both optimizations :)

@rvanvelzen
Copy link
Contributor Author

I already updated #1666 to remove your optimization. As you noted there it's the same thing but a bit more aggressive.

@ondrejmirtes
Copy link
Member

I see, I didn't notice that. I'll merge it right away :)

@ondrejmirtes
Copy link
Member

Just merged it.

@herndlm
Copy link
Contributor

herndlm commented Sep 22, 2022

the array improvements are strong today 💪

@ondrejmirtes
Copy link
Member

This is green now 🎉

@rvanvelzen rvanvelzen marked this pull request as ready for review September 23, 2022 09:38
@ondrejmirtes ondrejmirtes merged commit 7190fb7 into phpstan:1.8.x Sep 23, 2022
@ondrejmirtes
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants