Balanced trees

Steven D'Aprano steve+comp.lang.python at
Tue Mar 11 02:26:27 CET 2014

On Mon, 10 Mar 2014 19:24:07 -0400, Roy Smith wrote:

> In article <8761nmrnfk.fsf at>,
>  Marko Rauhamaa <marko at> wrote:
>> Anyway, this whole debate is rather unnecessary since every developer
>> is supposed to have both weapons in their arsenal.
> The problem with having a choice is that it opens up the possibility of
> making the wrong one :-)
> As this discussion has shown, figuring out whether a hash table or a
> tree is better for a given problem is non-trivial.  My guess is that if
> you gave 1000 typical developers both data structures and let them pick
> freely, the number of cases where it really mattered and the developer
> picked the right one would be approximately equal to the number of cases
> where they picked the wrong one.

You're very optimistic.

In my experience, the average developer has an amazing talent for 
pessimising code when they think they are optimising it.

Steven D'Aprano

More information about the Python-list mailing list