Why Does Dscanner Warn About a Missing toHash if opEquals is Defined?
qlksgj via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Aug 1 04:08:49 PDT 2016
On Monday, 1 August 2016 at 10:35:29 UTC, pineapple wrote:
> Every hashing function will produce collisions.
Not totally true: when the hash map content is static (i.e known
at compile time) there are probabilities that a perfect hashing
function exists. But these kind of functions are a bit special
because each byte of the value maps to another byte. See the gnu
tool "gperf" for example.
More information about the Digitalmars-d-learn
mailing list