On 9/26/07, Jason Orendorff <[EMAIL PROTECTED]> wrote: > One situation where a sorteddict would win is finding upper and lower > bounds. This especially matters if you want to iterate over a > specific range of keys: "show me all entries between 1 Jan 2007 and 1 > Feb 2007" is O(N) in the number of entries in that range, not the > entire data set.
Yeah, we do this a lot. We frequently end up with dictionaries with hundreds of thousands of entries and a simple wrapper on std::map gives us about 120x the performance of python dict in our use case, almost entirely due to the fact that we search a LOT more than we insert. -- Nick _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com