Skip to content

Adding benchmark to test :key vs 'key' when generating a hash - #135

Closed
konung wants to merge 5 commits into
fastruby:mainfrom
konung:master
Closed

konung wants to merge 5 commits into
fastruby:mainfrom
konung:master

Conversation

@konung

@konung konung commented Oct 8, 2017 •

Copy link
Copy Markdown
Contributor

This is a benchmark to show that for larger hash the difference in using :key vs 'key' for hashes could be significant, especially using latest versions of Ruby ( 2.4.2)

Juanito let me know what you think. If you like this benchmark - I have a couple more ideas. Thanks

@konung

konung commented Sep 30, 2026

Copy link
Copy Markdown
Contributor Author

Thank you. :) That's a blast from the past

@JuanVqz

JuanVqz commented Sep 30, 2026

Copy link
Copy Markdown
Member

Thank you for this contribution! It landed in #247, with you credited as co-author on its commit. The 1000-pair benchmark is split into building and reading files with fixed data, and the one-pair literal file was left out, since on current Ruby each of those literals compiles to a copy of a prebuilt Hash. Closing this in favor of #247.

@JuanVqz JuanVqz closed this Sep 30, 2026
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.

3 participants