TLDR:Yes-- you can sort numbers in linear time. Yes, including floats! The proof that you can sort in $O(n \log n)$ time is still true, but that assumes you're sorting on the infinite set of real numbers (or integers.) We can sort in linear time because we work with finite sets: Floats and ints. The algorithm is very simple, and is called counting sort (or bin sort or radix sort.)See the Python notebook wrapping an unoptimized Rust countsort implementation:

--

Is this truly $O(n)$? Yes!

- Counting sort is not a randomized algorithm, it always outputs the correct solution.
- Counting sort is not a parallelized algorithm. (And you can't use parallelism to speed past a worst-case big-O run time anyway!)
- Counting sort is not an amortized algorithm. It is truly $O(n)$, not 'expected' or 'amortized' $O(n)$.
- Counting sort is technically $Θ(n)$, that is, the worst and best case running time is linear.
- This can be used in the real world.
- However, it is not an in-place sorting algorithm.