Cache-efficient string sorting using copying

  • Authors:
  • Ranjan Sinha;Justin Zobel;David Ring

  • Affiliations:
  • RMIT University, Melbourne, Australia;RMIT University, Melbourne, Australia;Palo Alto, CA

  • Venue:
  • Journal of Experimental Algorithmics (JEA)
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

Burstsort is a cache-oriented sorting technique that uses a dynamic trie to efficiently divide large sets of string keys into related subsets small enough to sort in cache. In our original burstsort, string keys sharing a common prefix were managed via a bucket of pointers represented as a list or array; this approach was found to be up to twice as fast as the previous best string sorts, mostly because of a sharp reduction in out-of-cache references. In this paper, we introduce C-burstsort, which copies the unexamined tail of each key to the bucket and discards the original key to improve data locality. On both Intel and PowerPC architectures, and on a wide range of string types, we show that sorting is typically twice as fast as our original burstsort and four to five times faster than multikey quicksort and previous radixsorts. A variant that copies both suffixes and record pointers to buckets, CP-burstsort, uses more memory, but provides stable sorting. In current computers, where performance is limited by memory access latencies, these new algorithms can dramatically reduce the time needed for internal sorting of large numbers of strings.