-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Refator array_map into simple loop for performance #11332
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL
* 2.19.x: Refator array_map into simple loop for performance. (doctrine#11332)
ties a knot into his handkerchief |
Wouldn't it make sense to ban array_map with phpcs and remove all usage in all places of the code? I see it is used in SqlWalker, BasicEntityPersister, ReflectionPropertiesGetter, hydrators and other places |
Alternative to more complex performance refactoring in #11316
This already reduces performance overhead measured by Tideways by 56%. It shows again how expensive array_map is vs a simple foreach in performance sensitive code path.
Related to #11087