Hashes can sometimes be cached, if there is ample room in the data construction where The main element is saved; caching the results of comparisons (a binary operation) is usually impractical. On the other hand, comparisons can gain from shortcutting: if keys often differ within the 1st couple of bytes, a unfavorable comparison can be quite rapid."