Would be more valid to compare to Boost's "spreadsort" which is similarly a hybrid radix sort algorithm (and also outperforms std::sort).
Would be more valid to compare to Boost's "spreadsort" which is similarly a hybrid radix sort algorithm (and also outperforms std::sort).
Basically, how many elements do you have to move in a list of N elements to end up with one of the possible orderings
The problem is the information in a permutation (n! possible orderings) and one can only ever "throw away" half of them on every comparison, leading to log_2(n!) or nlog(n).
Most people would be fine with a hybrid radix sort for day to day use.
However, it might be possible if comparisons are not essential - e.g. radix sort is (with some assumptions) O(N)
[1] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n429...
The standard doesn't seem to say "or better" here, but I know that in other places it does (or least used to say something similar).
Note that this wouldn't be true if the standard said that it has to be Θ(n log n).
If something is O(1) it's also O(n) and O(n!), since it's an upper bound.