Re: Ordered dictionaries compared

2013-05-23 Thread Antoine Pitrou
Dan Stromberg drsalists at gmail.com writes: What kind of ordered dictionaries?  Sorted by key. Calling them sorted dictionaries avoids any confusions with Python's standard OrderedDict class: http://docs.python.org/3.3/library/collections.html#ordereddict-objects Regards Antoine. --

Re: Ordered dictionaries compared

2013-05-23 Thread duncan smith
On 23/05/13 04:31, Dan Stromberg wrote: What kind of ordered dictionaries? Sorted by key. I've redone the previous comparison, this time with a better red-black tree implementation courtesy of Duncan G. Smith. The comparison is at

Re: Ordered dictionaries compared

2013-05-23 Thread Dan Stromberg
On Thu, May 23, 2013 at 9:41 AM, duncan smith buzzard@invalid.invalidwrote: RBT is quicker than Treap for insertion with randomized data, but slower with ordered data. Randomized data will tend to minimize the number of tree rotations needed to keep the RBT balanced, whilst the Treap will be

Re: Ordered dictionaries compared

2013-05-23 Thread duncan smith
On 23/05/13 18:44, Dan Stromberg wrote: On Thu, May 23, 2013 at 9:41 AM, duncan smith buzzard@invalid.invalid mailto:buzzard@invalid.invalid wrote: RBT is quicker than Treap for insertion with randomized data, but slower with ordered data. Randomized data will tend to minimize the

Ordered dictionaries compared

2013-05-22 Thread Dan Stromberg
What kind of ordered dictionaries? Sorted by key. I've redone the previous comparison, this time with a better red-black tree implementation courtesy of Duncan G. Smith. The comparison is at http://stromberg.dnsalias.org/~strombrg/python-tree-and-heap-comparison/just-trees/ The Red-Black tree