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

Compare Hash#select#values vs Hash#values#select vs Hash#values#compact #124

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sFrenkie
Copy link

@sFrenkie sFrenkie commented May 5, 2017

This benchmark proves that get not nil values from hash is fastest with Hash#values#compact

Copy link
Member

@etagwerker etagwerker left a comment

Choose a reason for hiding this comment

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

I think this PR adds value if you keep the fastest and fast methods, but I feel like slow is doing something way different.

fast and fastest are calling a method on Array (compact vs select) but slow is calling a method on Hash and it's a little too contrived.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants