Abstract

We develop models of secondary storage to evaluate external sorting and use them to analyze the average I/O access time of mergesort and tag sort on files with uniform key distribution. The k-way mergesort takes [log <inf xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">k</inf> R] merge passes to sort a file with R initial sorted runs. Choosing k as large as possible reduces the number of merge passes, but we show that under the assumptions of our models, the I/O access time of the merge phase in mergesort increases as a function of k. For large files with short keys, tag sort provides a promising alternative to mergesort. We analyze the I/O access time of tag sort with a ``sequential scan'' distribution method. We show that for large files tag sort takes asymptotically less I/O time than mergesort.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call