Hashing protocol

bearophile bearophileHUGS at lycos.com
Tue Jul 5 16:34:13 PDT 2011


Since some time the built-in associative arrays don't use search trees to manage collisions, but just linked lists. So if you want to implement the hash protocol for a struct do you need to add it a opCmp() too still (that was needed just for those trees), or is now opEquals() enough (plus toHash)?

If the answer is positive then the part about hashing of this page is obsolete:
http://www.digitalmars.com/d/2.0/hash-map.html

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list