Urabe Shyouhei <shyouhei / ruby-lang.org> wrote:
> No, sorry I see no evident speedup.  When I wrote the patch I thought the
> function was used for Hash#rehash, but it turned out Hash#rehash uses
> something different (don't know why).  The optimization is valid I
> believe but in fact used very rarely.

Alright.  My understanding is branch mispredict costs are higher than
the memory stores which would be avoided.  The expensive part is loading
memory on cache miss, and that is not avoided.

We'll probably need to poke around with perf or similar tools to
analyze/confirm this.