3 ms·
Not really, no. The only parallel is that you're putting things into buckets, but other than that they're very different algorithms.
by Sean1708 7y ago
Not really, no. The only parallel is that you're putting things into buckets, but other than that they're very different algorithms.
- shawnz 7y agoWouldn't the complexity, number of movements, etc also be the same? What's the difference? Why wouldn't a radix sort approach suffer from the same disadvantages as the hash unique approach (e.g. locality of reference)?
- Sean1708 7y agoIt's worth giving the Wiki page a quick read, it's very accessible: https://en.wikipedia.org/wiki/Radix_sort https://en.wikipedia.org/wiki/Radix_sort TL;DR: I guess the hash unique approach is technically a radix sort in base-64 if you hash the inputs before applying the radix sort, but a realistic radix sort will use far fewer buckets giving it much better cache locality and won't unnecessarily hash the buckets. Also it's possible to write a radix sort that doesn't use any extra indirection, but that's a much more complex implementation and I doubt it really has any performance benefits.