[Python-Dev] Simple dicts
Guido van Rossum
guido@python.org
Thu, 15 May 2003 07:10:37 -0400
> When I took data structures I was taught that chaining was actually the
> easiest way to do hash tables and they still had good performance
> compared to open addressing. Because of this taught bias I always
> wondered why Python used open addressing; can someone tell me?
It was my choice, but I don't recall why. Probably because Knuth said
so. Or because it's simpler to implement with a single allocated
block (I think I was aware of the cost of malloc(), or else tuples and
strings would have used two blocks. BTW, why don't Unicode objects
use this trick?)
--Guido van Rossum (home page: http://www.python.org/~guido/)