Engineering radix sort

Peter M. McIlroy, Keith Bostic, M. D. McIlroy · 1993

Radix sorting methods have excellent asymptotic performance on string data, for which comparison is not a unit-time operation. Attractive for use in large byte-addressable memories, these methods have nevertheless long been eclipsed by more easily programmed algorithms. Three ways to sort strings by bytes left to right---a stable list sort, a stable two-array sort, and an in-place "American flag" sort---are illustrated with practical C programs. For heavy-duty sorting, all three perform comparably, usually running at least twice as fast as a good quicksort. We recommend American flag sort for general use.

Read the paper · More papers on PaperTik