Abstract
The increasing latency between memory and processor speeds has made it imperative for algorithms to reduce expensive accesses to main memory. In earlier work, we presented cache-conscious algorithms for sorting strings, that have been shown to be almost two times faster than the previous algorithms, mainly due to better usage of the cache. In this paper, we propose two new algorithms, Burstsort and MEBurstsort, for sorting large sets of integer keys. Our algorithms use a novel approach for sorting integers, by dynamically constructing a compact trie which is used to allocate the keys to containers. These keys are then sorted within the cache. The new algorithms are simple, fast and efficient. We compare them against the best existing algorithms using several collections and data sizes. Our results show that MEBurstsort is up to 3.5 times faster than memory-tuned quicksort for 64-bit keys and up to 2.5 times faster for 32-bit keys. For 32-bit keys, on 10 of the 11 collections used, MEBurstsort was the fastest, whereas for 64-bit keys, it was the fastest for all collections.
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
Aho, A., Hopcroft, J.E., Ullman, J.D.: The Design and Analysis of Computer Algorithms. Addison-Wesley, Reading (1974)
Heinz, S., Zobel, J., Williams, H.E.: Burst tries: A fast, efficient data structure for string keys. ACM Transactions on Information Systems 20(2), 192–223 (2002)
Hennessy, J.L., Patterson, D.A.: Computer Architecture: A Quantitative Approach. Morgan Kaufmann, San Mateo (2002)
Jimenez-Gonzalez, D., Navarro, J., Larriba-Pey, J.L.: The effect of local sort on parallel sorting algorithms. In: Proceedings of Parallel and Distributed Processing Workshop, Las Palmas de Gran Canaria, Spain (January 2002)
Jimenez-Gonzalez, D., Navarro, J., Larriba-Pey, J.L.: Cc-radix: a cache conscious sorting based on radix sort. In: Proceedings of the 11th Euromicro Workshop on Parallel, Distributed and Network-based processing (2003)
Knuth, D.E.: The Art of Computer Programming: Sorting and Searching, 2nd edn., vol. 3. Addison-Wesley, Massachusetts (1997)
LaMarca, A., Ladner, R.E.: The influence of caches on the performance of sorting. Jour. of Algorithms 31(1), 66–104 (1999)
Meyer, U., Sanders, P., Sibeyn, J.F. (eds.): Algorithms for Memory Hierarchies. LNCS, vol. 2625. Springer, Heidelberg (2003)
Rahman, N., Raman, R.: Analysing cache effects in distribution sorting. ACM Jour. of Experimental Algorithmics 5, 14 (2000)
Rahman, N., Raman, R.: Adapting radix sort to the memory hierarchy. ACM Jour. of Experimental Algorithmics 6(7) (2001)
Sedgewick, R.: Algorithms in C, 3rd edn. Addison-Wesley Longman, Reading (1998)
Sinha, R., Zobel, J.: Cache-conscious sorting of large sets of strings with dynamic tries. In: Ladner, R. (ed.) 5th ALENEX Workshop on Algorithm Engineering and Experiments, Baltimore, Maryland, January 2003, pp. 93–105 (2003)
Sinha, R., Zobel, J.: Efficient trie-based sorting of large sets of strings. In: Oudshoorn, M. (ed.) Proceedings of the Australasian Computer Science Conference, Adelaide, Australia, February 2003, pp. 11–18 (2003)
Wickremesinghe, R., Arge, L., Chase, J., Vitter, J.S.: Efficient sorting using registers and caches. ACM Jour. of Experimental Algorithmics 7(9) (2002)
Xiao, L., Zhang, X., Kubricht, S.A.: Improving memory performance of sorting algorithms. ACM Jour. of Experimental Algorithmics 5, 3 (2000)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2004 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Sinha, R. (2004). Using Compact Tries for Cache-Efficient Sorting of Integers. In: Ribeiro, C.C., Martins, S.L. (eds) Experimental and Efficient Algorithms. WEA 2004. Lecture Notes in Computer Science, vol 3059. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-24838-5_38
Download citation
DOI: https://doi.org/10.1007/978-3-540-24838-5_38
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-22067-1
Online ISBN: 978-3-540-24838-5
eBook Packages: Springer Book Archive