Search NASAโŒ• Search

NASA NTRS ยท 19780046024

Sorting on STAR

Abstract

Timing comparisons are given for three sorting algorithms written for the CDC STAR computer. One algorithm is Hoare's (1962) Quicksort, which is the fastest or nearly the fastest sorting algorithm for most computers. A second algorithm is a vector version of Quicksort that takes advantage of the STAR's vector operations. The third algorithm is an adaptation of Batcher's (1968) sorting algorithm, which makes especially good use of vector operations but has a complexity of N(log N)-squared as compared with a complexity of N log N for the Quicksort algorithms. In spite of its worse complexity, Batcher's sorting algorithm is competitive with the serial version of Quicksort for vectors up to the largest that can be treated by STAR. Vector Quicksort outperforms the other two algorithms and is generally preferred. These results indicate that unusual instruction sets can introduce biases in program execution time that counter results predicted by worst-case asymptotic complexity analysis.

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Stone, H. S.. 1978-03-01. Sorting on STAR. https://ntrs.nasa.gov/citations/19780046024

Cite the original work for its findings. Save a collection to share your selection of sources.