Hacker News new | ask | show | jobs
by ants_everywhere 287 days ago
As others have pointed out, radix sort is O(64N) = O(N) for a fixed key length of uint64s as in this article

So it comes down to the cost of hashing, hash misses, and other factors as discussed in the article.

I remember learning that radix sort is (almost?) always fastest if you're sorting integers.

A related fun question is to analyze hash table performance for strings where you have no bound on string length.

1 comments

Sorting wins for unbounded strings because it only needs a prefix of each string.