On Wed, Aug 22, 2001 at 02:32:29PM +0900, Wai-Sun Chia wrote: > Question: > 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., $ a = {1 => 1} $ b = {1 => 1} $ a == b true $ a.id == b.id false a == b potentially has to check the entire hashes to see if they are equal (if they are unequal, the check can be terminated as soon as two non-matching elements are found). a.id == b.id only has to compare two integers // Niklas