Associative Arrays max length? 32bit/64bit
bearophile via Digitalmars-d
digitalmars-d at puremagic.com
Sat May 17 13:30:28 PDT 2014
FG:
> 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?
Sorry, I didn't know the linked list is sorted. It's scanned
sequentially, because you can't use a binary search on a regular
linked list. Perhaps a skiplist is better to avoid O(n^2)
behavour in presence of attacks or degenerate cases (in past the
AA used a tree there).
Bye,
bearophile
More information about the Digitalmars-d
mailing list