Re: Sorting [was Re: Performance of int/long in Python 3]

2013-04-03 Thread Roy Smith
In article <515c400e$0$29966$c3e8da3$54964...@news.astraweb.com>, Steven D'Aprano wrote: > I seem to recall that "sort relies only on < operator" is a language > promise, but I can't seem to find it documented anywhere official. That's pretty typical for sort implementations in all languages.

Sorting [was Re: Performance of int/long in Python 3]

2013-04-03 Thread Steven D'Aprano
On Wed, 03 Apr 2013 07:52:42 -0400, Dave Angel wrote: > I thought that the sort algorithm used a hash of all > the items to be sorted, and only reverted to a raw comparison of the > original values when the hash collided. Is that not the case? Or is > the code you post here only used when the ha