There is a floor under comparison sorting that no cleverness can break: Ω(n log n) comparisons. The proof is a counting argument — a sort must distinguish all n! possible orderings of the input, and each yes/no comparison splits the possibilities in at most two, so you need at least log₂(n!) comparisons to tell them apart (a decision tree of n! leaves has depth ≥ log₂(n!)). For n=4 there are 24 orderings, and since 2⁴=16 < 24 ≤ 32=2⁵, you need at least 5 comparisons. It is an information-theoretic limit — and it is why radix sort (which does not compare) can go faster.
The demo computes the bound for n=4: 4!=24 orderings need ≥ log₂(24) = 5 comparisons: live demo
“A smarter comparison sort could beat n log n.” — no: distinguishing n! orderings needs log₂(n!) comparisons; it is a proven floor. cited
A limit proven by counting orderings, not by trying algorithms — the floor comparison sorts cannot cross. theorem
On the canonical compiler, 4! = 24 and the smallest c with 2ᶜ ≥ 24 is 5 — so at least 5 comparisons: