I do not understand why Data.HashTable
is using Data.Hashable
, which has hashWithSalt
as the (only/basic) method.
This does not fit with the natural optimization of computing the hash value once, and storing it in the object (natural, because Haskell objects are immutable).
If I want to use HashTables
with that, then I'm forced to implement hashWithSalt
.
(Going 1.2.0.* to 1.2.1.*, hashable re-introduced hash
as a class method, but this does not help?)
The actual Table implementations don't seem to make use of hashWithSalt
(HashTable.ST.Linear
does not at all, HashTable.ST.Cuckoo
uses two fixed salts only).