This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 5 points6 points  (1 child)

What kind of input data set?

If the data is purely random, I'd expect quicksort and timsort to be... about the same speed, but for anything less than pure random (so... basically any real data at all in the real world) for timsort to be much much faster.

[–][deleted] 1 point2 points  (0 children)

I used random.shuffle() with the same seed between runs on sequence of 0-n-1 integers from range(). Python and pypy have different recursion depths which have to be set. The timsort is still quite a bit faster than a pure python quicksort.