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

Faster and implementation of some #1944

Merged
merged 1 commit into from Jul 10, 2023
Merged

Faster and implementation of some #1944

merged 1 commit into from Jul 10, 2023

Conversation

jdeniau
Copy link
Member

@jdeniau jdeniau commented Jul 10, 2023

Actually, some is slightly slower than find, which it should not.

This PR improves the implementation of some to avoid calling every / not. I think that this makes the implementation more easy to understand too.
The drawback is that we re-implement a collection iteration there.

According to the benchmark, there is ~40% gain on list with 100 000 items.

image

@jdeniau jdeniau merged commit ad5aeb4 into main Jul 10, 2023
5 checks passed
@jdeniau jdeniau deleted the perf-collectionSome branch July 10, 2023 12:29
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

1 participant