Skip to content

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 💪

@rvanvelzen rvanvelzen force-pushed the serious-perf branch 2 times, most recently from a0d4c85 to c78f2cf Compare September 23, 2022 07:58
@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

Development

Successfully merging this pull request may close these issues.

3 participants