Abstract
We present a register efficient implementation of Mergesort which we call FAME (Finite Automaton MErgesort). FAME is a m-way Mergesort. The m streams are merged by organizing comparison tournaments among the elements at the heads of the streams. The winners of the tournament form the output stream. Many ideas are used to increase efficiency. First, the heads of the streams are maintained in the register file. Second, the tournaments are evaluated incrementally, i.e. after one winner is output the next tournament uses the results of the comparisons performed in the preceding tournaments and thus minimizes work. Third, to minimize register movement, the state of the tournament is encoded as a finite automaton. We experimented with 8-way and 4-way FAME on an Ultrasparc and a DEC Alpha and found that these algorithms were better than cache-cognizant Quicksort algorithms on the same machines.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Alok Aggarwal and Jeffrey Scott Vitter. I/O-complexity of sorting and related problems. Communications of the ACM, 31:1116–1127, 1988.
D. E. Knuth. The art of computer programming, volume 3. Addison-Wesley, 1973.
Sonal (Sancheti) Kothari. Algorithm Optimization Techniques for the Memory Heirarchy. M.Tech thesis, Indian Institute of Technology, Bombay, 1999.
A. LaMarca and R. Ladner. The influence of caches on the performance of sorting. In Proceedings of the ACM-SIAM Symposium on Discrete Algorithms, 1997.
C. Nyberg, T. Barclay, Z. Cvetanovic, J. Gray, and D. Lomet. AlphaSort: a RISC machine sort. In Proceedings of the 1994 ACM SIGMOD international conference on Management of data, volume 23, pages 233–242, 1994.
Jeff Vitter. External Memory Algorithms and Data structures: Dealing with Massive Data, 1999. manuscript.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2000 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Ranade, A., Kothari, S., Udupa, R. (2000). Register Efficient Mergesorting. In: Valero, M., Prasanna, V.K., Vajapeyam, S. (eds) High Performance Computing — HiPC 2000. HiPC 2000. Lecture Notes in Computer Science, vol 1970. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-44467-X_9
Download citation
DOI: https://doi.org/10.1007/3-540-44467-X_9
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-41429-2
Online ISBN: 978-3-540-44467-1
eBook Packages: Springer Book Archive