Hashes can sometimes be cached, if there is adequate room in the information structure where The real key is stored; caching the results of comparisons (a binary operation) is often impractical. On the flip side, comparisons can advantage from shortcutting: if keys often vary within the 1st few bytes, a negative comparison can be extremely quickly.