

Killing quicksort - l0stman
http://research.swtch.com/2008/01/killing-quicksort.html

======
_delirium
I suppose this is why C++ uses introsort, which is basically a quicksort that
churns for no more than O(n log n) steps before "bailing out" to a guaranteed
O(n log n) algorithm like heapsort. That lets it get quicksort's in-practice-
fast speeds on almost all inputs, while falling back to no worse than O(n log
n) in the rare cases where quicksort would go quadratic (though it'll be worse
in those rare cases, by a constant factor, than just running heapsort
originally would've been).

edit: <http://www.cs.rpi.edu/~musser/gp/introsort.ps>

~~~
shin_lao
Additionally, introspective sort uses the insertion sort when the range is
below a certain threshold.

