Open sjakobi opened 2 years ago
It might be useful to hash the length of the Collision
arrays though. For e.g. ByteString
, these are hashed too.
Good point. Another option is to get a fold that includes the hash and use that. Less efficient for collisions, but we assume those are rare.
Another option is to get a fold that includes the hash and use that. Less efficient for collisions, but we assume those are rare.
I don't understand what kind of fold would work here in combination with the necessary sorting of hashes?
https://github.com/haskell-unordered-containers/unordered-containers/blob/b6bde46eae679111c3f088964f192290cc08b6c8/Data/HashMap/Internal.hs#L508-L530
For
Leaf
nodes, we skip hashing the keys. ForCollision
nodes we hash the keys. I think we should skip hashing the latter too.