Thread:Mathmagician/@comment-3562424-20121121052230/@comment-4674838-20121121055510

Assuming you're refering to http://mathmagician.wikia.com/wiki/SortingDemo

QuickSortRecursive is the easiest one to read the code for if you want to understand the algorithm.

After that, I made a series of small logic changes to eliminate overhead (algorithm stays the same), these are called QS Stack 1 - 4

Finally, the last one is called just QuickSort, and is optimized as far as I could think to do so. In general, I've observed it to be the fastest one.

In versions of QuickSort, the speed difference is most prominent between QS Stack 1 and QS Stack 2, when I inlined the swap call inside the double loop.

Ultimately, all the sorting algorithms on that page are $$O(nlogn)$$ time in the long run, so the speed differences are just by a small multiplicable factor. Unless you're sorting arrays with hundreds of thousands of items, you won't see that multiplicative factor play a huge role in speed differences, so you might as well use the browser-default  instead of my code.