AA with complex keytype?

Manfred Nowak svv1999 at hotmail.com
Fri Feb 9 13:55:38 PST 2007


Frits van Bommel wrote

> Since hash functions can be user-defined, and not all users
> are experts at hashing, you need to consider that use case.
Currently implemented AA's need to have for a good runtime beahviour at 
least one of 1) or 2)
where:
(1a) toHash implements a good distribution and
(1b) opCmp==!opEquals or better
or
(2a) toHash worse than described by (1a) and
(2b) opCmp implements an ordering suitable for use in unbalanced binary 
trees

There is no evidence, that users that are no experts at hashing will be 
experts at implementing a suitable ordering, especially if the elements 
do not have a natural ordering.

-manfred



More information about the Digitalmars-d mailing list