Among the previous algorithms, quick sort performs worst in the worst case, while the others are always $O(n \log n)$. However, quick sort is known to be the fastest in practice for most inputs.
| Algorithm | Average speed | Worst speed | Extra memory usage |
|---|---|---|---|
| Quick sort | Fastest ($O(n \log n)$) | Slowest ($O(n^2)$) | None ($O(1)$) |
| Merge sort | $O(n \log n)$ | $O(n \log n)$ | Auxiliary array ($O(n)$) |
| Heap sort | $O(n \log n)$ | $O(n \log n)$ | None ($O(1)$) |
1 | |
One notable result is that the worst case of quick sort is severe enough to be interesting. (The worst case for quick sort occurs when all elements have the same value.)