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

[9.x] Optimize Collection::containsStrict #44970

Merged
merged 1 commit into from Nov 16, 2022

Conversation

tyabu12
Copy link
Contributor

@tyabu12 tyabu12 commented Nov 16, 2022

This PR increase the speed of Collection::containsStrict by using in_array (strict) .

The execution speed is increased by a factor between 2 and 10.
Here is the benchmark.
https://3v4l.org/UCqoe

@taylorotwell taylorotwell merged commit 9a6419c into laravel:9.x Nov 16, 2022
@tyabu12 tyabu12 deleted the optimize-contains-strict branch November 16, 2022 23:40
@tyabu12 tyabu12 changed the title Optimize Collection::containsStrict [9.x] Optimize Collection::containsStrict Nov 18, 2022
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.

None yet

2 participants