Skip to content

micro-optimization: use spl_object_id() instead of spl_object_hash() #1364

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

Merged
merged 2 commits into from
Aug 29, 2023

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Aug 28, 2023

spl_object_id() exists since php 7.2, I think we can use it over spl_object_id().

rector and wordpress micro benchmarks suggests its faster

Copy link
Member

@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @staabm!

@Ocramius Ocramius self-assigned this Aug 29, 2023
@Ocramius Ocramius added this to the 6.13.0 milestone Aug 29, 2023
@Ocramius Ocramius changed the title micro: use spl_object_id() micro-optimization: use spl_object_id() instead of spl_object_hash() Aug 29, 2023
@Ocramius Ocramius merged commit 89087a6 into Roave:6.13.x Aug 29, 2023
@staabm staabm deleted the spl branch August 29, 2023 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants