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

mrb_hash_ht_hash_func use mrb_obj_id() instead of mrb_sym2name_len() #2027

Closed
wants to merge 1 commit into from
Closed

mrb_hash_ht_hash_func use mrb_obj_id() instead of mrb_sym2name_len() #2027

wants to merge 1 commit into from

Conversation

ksss
Copy link
Contributor

@ksss ksss commented Apr 8, 2014

hash[:symbol] is usecase of commonly-used.

But mrb_sym2name_len have cost that search symbol from n2s table.
And Symbol.object_id is never change.

I propose to use mrb_obj_id() when hash search symbol key.

Simplicity benchmark https://gist.github.com/ksss/10088148

@matz matz closed this in 63cf707 Apr 9, 2014
@ksss ksss deleted the hash-symbol-key branch April 13, 2014 12:41
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