sorting times

Gary Herron gherron at
Thu Mar 25 00:47:48 CET 2004

On Wednesday 24 March 2004 02:50 pm, Matt wrote:
> Results:
> File: two columns, <str>\t<float>,
> pow(10, 5) lines in file.
> Bubble Sort takes 32 - 35 minutes
> Quick Sort takes 8 seconds

Yes, I think this is reasonable for sorting 100,000 items.  The bubble
sort really is that bad.  (As a *general* sorting algorithm -- there
are some highly specialized places where it performs rather well --
such as several graphics algorithms where only a few items are likely
to out of order by only a few places.)

Gary Herron

More information about the Python-list mailing list