The ByHash() functions are somewhat dangerous but particularly useful in two scenarios:  Heterogeneous lookup to avoid creating expensive keys likeFStringwhen looking up by const TCHAR*. You must ensure the hash is calculated in the same way as ElementType is hashed. If possible put both ComparableKey and ElementType hash functions next to each other in the same header to avoid bugs when the ElementType hash function is changed.  Reducing contention around hash tables protected by a lock. It is often important to incur the cache misses of reading key data and doing the hashingbeforeacquiring the lock.