Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

EmHttpRequestAdapter - Call detect instead of select..first #1042

Merged
merged 1 commit into from
Feb 4, 2024

Conversation

RicardoTrindade
Copy link
Contributor

Tiny tiny optimization PR

As per https://github.com/fastruby/fast-ruby/blob/main/code/enumerable/select-first-vs-detect.rb
Detect is slightly faster than select{}.first

Detect is slightly faster than select{}.first
@RicardoTrindade RicardoTrindade changed the title Call detect instead of select..first EmHttpRequestAdapter - Call detect instead of select..first Oct 27, 2023
@bblimke
Copy link
Owner

bblimke commented Feb 4, 2024

Thank you for this optimisation @RicardoTrindade 👍

@bblimke bblimke merged commit 890d41e into bblimke:master Feb 4, 2024
@RicardoTrindade RicardoTrindade deleted the patch-1 branch February 4, 2024 23:18
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants