This is a really slick little visual on sort algorithms. Really gives you a deeper appreciation of how different they are. These applets just show unsorted lengths of bars being sorted via different algorithms.
This demo has been around since Java 1.1! This version obviously has a few extra sort techniques added, but it still is pretty old itself. This reminds me of the old GWBASIC sort demos. On that demo, JSort and HeapSort are faster than QSort. JSort seems to finish first the most often. Quick Sort is of course depends on memory, datasize, etc… all I was saying was that on average, Quick Sort performs as good or better than almost all sorting algorithims.
Still quite a cool demo though.
Almost always you will want to use an in-place algorithm, and in-place Mergesort is generally slow, about O(n^2). But if you aren’t doing in-place sorting (like you want to combine a memcpy with a sort routine into one). Then Mergesort is more like O(n log n). Generally Quicksort is the best for in-place, with perhaps the Quicksort+Bubblesort hybrid. More info here.
More sorting demos in with a different presentation style can be found here too:
Stooge sort, Bozo sort