On 2014-05-17 21:35, bearophile wrote:
FG:

and don't forget the extra memory needed to store the tree for fast key look-up 
in the hash array.

I think D now uses a linked list for the collision chains (so opCmp is useless, 
despite it's still required for the hashing protocol).

Indeed, I just read 
https://github.com/D-Programming-Language/dmd/blob/master/src/backend/aa.c
Key hash is divided modulo the number of buckets and each bucket points to an 
ordered double-linked list. That list is walked left or right depending on what 
value Typeinfo::compare returns for two keys. Hmm... isn't opCmp used by that 
function? Why useless?

Reply via email to