Abstract
We study the performance of the most practical inversion-sensitive internal sorting algorithms. Experimental results illustrate that adaptive AVL sort consumes the fewest number of comparisons unless the number of inversions is less than 1%; in such case Splaysort consumes the fewest number of comparisons. On the other hand, the running time of Quicksort is superior unless the number of inversions is less than 1.5%; in such case Splaysort has the shortest running time. Another interesting result is that although the number of cache misses for the cache-optimal Greedysort algorithm was the least, compared to other adaptive sorting algorithms under investigation, it was outperformed by Quicksort.
- Adelson-Velskii, G., and Landis, E. 1962. On an information organization algorithm. Doklady Akademia Nauk SSSR, 146, 263--266.Google Scholar
- Brodal, G., Fagerberg, R., and Moruz, G. 2005. On the adaptiveness of Quicksort. Proceedings of the 7th Workshop on Algorithm Engineering and Experiments, Vancouver, B.C., Canada, January 22, pp. 130--140, SIAM.Google Scholar
- Brodal, G., Fagerberg, R., and Moruz, G. 2005. Cache-aware and cache-oblivious adaptive sorting. Proceedings of the 32nd International Colloquium on Automata, Languages and Programming, Lisboa, Portugal, July 11--15, Lecture Notes on Computer Science 3580, pp. 576--588, Springer Verlag. Google ScholarDigital Library
- Cole, R. 2000. On the dynamic finger conjecture for splay trees. Part II: The proof. SIAM Journal on Computing, 30, 44--85. Google ScholarDigital Library
- Cook, R. and Kim, J. 1980. Best sorting algorithms for nearly sorted lists. Communications of the ACM, 23, 620--624. Google ScholarDigital Library
- Dromey, P. 1984. Exploiting partial order with Quicksort. Software: Practice and Experience, 14, 509--518.Google ScholarCross Ref
- Elmasry, A. 2004. Adaptive sorting with AVL trees. 18th IFIP World Computer Congress, Proceedings of the 3rd International Conference on Theoretical Computer Science, Toulouse, France, August 23--26, pp. 315--324.Google ScholarCross Ref
- Elmasry, A., Jensen, C., and Katajainen, J. Multipartite priority queues. ACM Transactions on Algorithms. To appear. Google ScholarDigital Library
- Elmasry, A., Jensen, C., and Katajainen, J. 2004. A framework for speeding up priority queue operations. CPH STL TR 2004-3, Department of Computing, University of Copenhagen.Google Scholar
- Elmasry, A. 2002. Priority queues, pairing and adaptive sorting. Proceedings of the 29th International Colloquium on Automata, Languages and Programming, Malaga, Spain, July 8--13, Lecture Notes on Computer Science 2380, pp. 183--194, Springer Verlag. Google ScholarDigital Library
- Elmasry, A. and Fredman, M. 2008. Adaptive sorting: an information theoretic perspective. Acta Informatica, 45(1), 33--42. Google ScholarDigital Library
- Estivill-Castro, V., and Wood, D. 1992. A survey of adaptive sorting algorithms. ACM Computer Surveys, 24(4), 441--476. Google ScholarDigital Library
- Gonnet, G., and Munro, J. I. 1986. Heaps on heaps. SIAM Journal on Computing, 15, 964--971. Google ScholarDigital Library
- Guibas, L., Mccreight, E., Plass, M., and Roberts, J. 1977. A new representation for linear lists. Proceedings of the 9th Annual ACM Symposium on Theory of Computing, Atlanta, GA, USA, April 30--May 2, pp. 49--60. Google ScholarDigital Library
- Hoare, C. 1961. Algorithm 64: Quicksort. Communications of the ACM, 4(7), 321. Google ScholarDigital Library
- Knuth, D. 1998. The Art of Computer Programming. Vol III: Sorting and Searching. Addison-wesley, second edition. Google ScholarDigital Library
- Levcopoulos, C., and Peterson, O. 1996. Exploiting few inversions when sorting: Sequential and parallel algorithms. Theoretical Computer Science, 163, 211--238. Google ScholarDigital Library
- Levcopoulos, C., and Peterson, O. 1993. Adaptive Heapsort. Journal of Algorithms, 14, 395--413. Google ScholarDigital Library
- Levcopoulos, C., and Peterson, O. 1991. Splitsort—An adaptive sorting algorithm. Information Processing Letters, 39, 205--211. Google ScholarDigital Library
- Mannila, H. 1985. Measures of presortedness and optimal sorting algorithms. IEEE Transactions on Computers, C-34, 318--325.Google ScholarDigital Library
- Mehlhorn, K. 1979. Sorting presorted files. Proceedings of the 4th GI Conference on Theoretical Computer Science, Aachen, Germany, March 26--28, Lecture Notes on Computer Science 67, pp. 199--212, Springer Verlag. Google ScholarDigital Library
- Moffat, A., Eddy, G., and Petersson, O. 1996. Splaysort: Fast, versatile, practical. Software: Practice and Experience, 126(7), 781--797. Google ScholarDigital Library
- Moffat, A. and Petersson, O. 1992. An overview of adaptive sorting. Australian Computer Journal, 24, 70--77.Google Scholar
- Moffat, A., Petersson, O., and Wormald, N. 1998. A tree-based Mergesort. Acta Informatica, 35(9), 775--793.Google ScholarCross Ref
- Sleator, D., and Tarjan, R. 1985. Self-adjusting binary search trees. Journal of the ACM, 32(3), 652--686. Google ScholarDigital Library
- Vuillemin, J. 1980. A unifying look at data structures. Communications of the ACM, 23, 229--239. Google ScholarDigital Library
- Wainwright, R. 1985. A class of sorting algorithms based on Quicksort. Commuications of the ACM, 28(4), 396--402. Google ScholarDigital Library
Index Terms
- Inversion-sensitive sorting algorithms in practice
Recommendations
On the adaptiveness of Quicksort
Quicksort was first introduced in 1961 by Hoare. Many variants have been developed, the best of which are among the fastest generic-sorting algorithms available, as testified by the choice of Quicksort as the default sorting algorithm in most ...
An empirical study for inversions-sensitive sorting algorithms
WEA'05: Proceedings of the 4th international conference on Experimental and Efficient AlgorithmsWe study the performance of the most practical internal adaptive sorting algorithms. Experimental results show that adaptive AVL sort performs the least number of comparisons unless the number of inversions is fewer than 1%. In such case, Splaysort ...
An inverted taxonomy of sorting algorithms
Special section on computer architectureAn alternative taxonomy (to that of Knuth and others) of sorting algorithms is proposed. It emerges naturally out of a top-down approach to the derivation of sorting algorithms. Work done in automatic program synthesis has produced interesting results ...
Comments