mirror of
https://github.com/apple/swift-collections
synced 2026-11-28 05:04:21 +00:00
If the key implements hashing properly, then this would be a clever way to try another hash seed to differentiate between colliding keys. However, if Key has proper hashing, then collision nodes are expected to be tiny, so it’s better to simply do naive comparisons. If the Key type has broken (i.e., partial) hashing, then loading colliding items into a dictionary would just make == even slower. So we’re better off comparing collidingh items via nested loops — so let’s just unconditionally do that.