Count how often each value occurs, add up the counts, then drop every value straight into its place. No comparisons.
This interactive visualization needs JavaScript.