From a causal glance, isn't your code limited by the amount of available memory?
Which could be totally useful in itself, but not even close to what "sort" is doing.
Did you run sort with a buffer size larger than the data? Your specialized one-pass program is likely faster, but at least the numbers would mean something.
That said, I don't see what is over-engineered here. It's pretty straightforward and easy to read.