In-Place Radix Sort

后端 未结 15 1298
日久生厌
日久生厌 2020-12-02 03:30

This is a long text. Please bear with me. Boiled down, the question is: Is there a workable in-place radix sort algorithm?


Preliminary

15条回答
  •  遥遥无期
    2020-12-02 03:56

    Performance-wise you might want to look at a more general string-comparison sorting algorithms.

    Currently you wind up touching every element of every string, but you can do better!

    In particular, a burst sort is a very good fit for this case. As a bonus, since burstsort is based on tries, it works ridiculously well for the small alphabet sizes used in DNA/RNA, since you don't need to build any sort of ternary search node, hash or other trie node compression scheme into the trie implementation. The tries may be useful for your suffix-array-like final goal as well.

    A decent general purpose implementation of burstsort is available on source forge at http://sourceforge.net/projects/burstsort/ - but it is not in-place.

    For comparison purposes, The C-burstsort implementation covered at http://www.cs.mu.oz.au/~rsinha/papers/SinhaRingZobel-2006.pdf benchmarks 4-5x faster than quicksort and radix sorts for some typical workloads.

提交回复
热议问题