Hi,
In message "[ruby-talk:20096] Re: Hash test performance issue"
on 01/08/22, Niklas Frykholm <r2d2 / umu.se> writes:
|> Why is
|> foo = (bar == @bigHumonguosHash) : apple ? orange
|>
|> Soooo much slower than (almost 100%)
|>
|> foo = (bar.id == @bigHumongousHash.id) : apple ? orange
|
|Because == compares the values, not the references, i.e.,
Yes, but I should have done equality check first (no value check
needed for identical hash). I will update.
matz.