[ruby-core:70139] Re: [Ruby trunk - Bug #11396] Bad performance in ruby >= 2.2 for Hash with many symbol keys

From: Eric Wong <normalperson@...>
Date: 2015-07-27 22:31:04 UTC
List: ruby-core #70139
Thanks for testing, committed as r51410 and 2.2 backport requested.

The only downside is slightly increased dynamic symbol registration
time because of the redundant call to rb_str_hash, but I doubt anybody
would notice.  There's no extra space overhead since RSymbol wasn't
using all the space available provided by RVALUE (40 bytes on 64-bit)
before.  Now it is.

I also considered making the `id' field based on the hash value last
year, but haven't gotten around to trying it (dealing with conflicts
might make it more trouble than it's worth).

In This Thread

Prev Next