About built-in AAs

Walter Bright newshound2 at digitalmars.com
Tue Aug 16 22:43:24 PDT 2011


On 8/16/2011 9:15 PM, Andrei Alexandrescu wrote:
> Let's please stop this. Many of us, including yourself, noticed the relatively
> poor performance of D's previous hashtables compared to other languages.
> Switching to singly-list collision handling marked an improvement. Now a lot of
> data structure designs have a worst-case that makes them perform worse than
> others. If you worry about attacks, please implement your own hashtable. If we
> switch back to the old implementation, you'll complain again about D's
> hashtables being slower than Python's, thus closing a years-long cycle.

Also, I should point out that the switch from binary trees to linear lists 
involved zero change in user code - not even a recompile.

Hence, any person who is worried about Bearophile's scenario, or that believe 
they can come up with a faster hash, can swap it with their own and prove it.

The hash implementation was made to be opaque to the user, and pluggable, and 
this proved it.


More information about the Digitalmars-d mailing list