Hashes can sometimes be cached, if there is ample space in the data construction where The crucial element is saved; caching the results of comparisons (a binary operation) is frequently impractical. However, comparisons can benefit from shortcutting: if keys usually vary within the first couple of bytes, a damaging comparison can be quite speedy.S