sorteddict PEP proposal [started off as orderedict]

Hrvoje Niksic hniksic at xemacs.org
Wed Sep 26 04:51:26 EDT 2007


Duncan Booth <duncan.booth at invalid.invalid> writes:

> I that's the point though: you can't write one implementation that has good 
> performance for all patterns of use

An implementation of sorted dict using a balanced tree as the
underlying data structure would give decent performance in all the
mentioned use cases.  For example, red-black trees search, insert, and
delete in O(log n) time.



More information about the Python-list mailing list