# Implementing Quicksort programs

@article{Sedgewick1978ImplementingQP, title={Implementing Quicksort programs}, author={Robert Sedgewick}, journal={Commun. ACM}, year={1978}, volume={21}, pages={847-857} }

This paper is a practical study of how to implement the Quicksort sorting algorithm and its best variants on real computers, including how to apply various code optimization techniques. [] Key Method A detailed implementation combining the most effective improvements to Quicksort is given, along with a discussion of how to implement it in assembly language. Analytic results describing the performance of the programs are summarized. A variety of special situations are considered from a practical standpoint to…

## 287 Citations

### The analysis of Quicksort programs

- Computer ScienceActa Informatica
- 2004

Results are derived which make it possible to obtain exact formulas describing the total expected running time of particular implementations on real computers of Quicksort and an improvement called the median-of-three modification.

### A better approach to QuickSort implementation

- Computer Science
- 2012

This paper formulates an alternative implementation of Quicksort that is faster and simpler and based on some profound basic principles and a better partitioning algorithm.

### Loop Programming Practices that Simplify Quicksort Implementations

- Computer ScienceArXiv
- 2019

Loop programming and refactoring techniques that lead to simplified implementation for Hoare's quicksort algorithm consisting of a single loop are presented and may be used for the discovery of more novel algorithms.

### Engineering a sort function

- Computer ScienceSoftw. Pract. Exp.
- 1993

A new qsortfunction for a C library that chooses partitioning elements by a new sampling scheme; it partitions by a novel solution to Dijkstra's Dutch National Flag problem; and it swaps efficiently.

### QuickSort A Historical Perspective and Empirical Study

- Business
- 2007

A comprehensive survey and empirical study of the Quicksort algorithm starting with the original version developed by Hoare in 1961 and ending with some of the most recent ones, which compared each algorithm in terms of the number of comparisons performed and the running times.

### Triple State QuickSort, A replacement for the C/C++ library qsort

- Computer ScienceArXiv
- 2015

An industrial grade Quicksort function along with its new algorithm, which is meant as a replacement for the C/C++ library qsort().

### The UNIX system: Theory and practice in the construction of a working sort routine

- Computer ScienceAT&T Bell Laboratories Technical Journal
- 1984

Because comparison in the standard UNIX™ operating system sort routine, /bin/sort, is interpretive, it is generally more time-consuming than the standard paradigm of comparing two integers. When a…

### A Meticulous Analysis of Mergesort Programs

- Computer ScienceCIAC
- 1997

The efficiency of mergesort programs is analysed under a simple unit-cost model, which includes the costs of key comparisons, element moves and address calculations, to establish the best possible time-bound relative to the model when sorting n integers.

### HYBRID QUICKSORT: AN EMPIRICAL STUDY

- Business, Computer Science
- 2013

The paper compares the running time performance of the existing quicksort partition algorithms with the proposed hybrid approach using unique and duplicate elements, and it is found that several the hybrid approaches performs faster than the existing algorithms for uniqueand duplicate elements.

## References

SHOWING 1-10 OF 23 REFERENCES

### Quicksort with Equal Keys

- Computer ScienceSIAM J. Comput.
- 1977

It is shown that, of the three strategies which have been suggested for dealing with equal keys, the method of always stopping the scanning pointers on keys equal to the partitioning element performs best.

### Sorting on STAR

- Computer ScienceIEEE Transactions on Software Engineering
- 1978

This paper gives timing comparisons for three sorting algorithms written for the CDC STAR computer. One algorithm is Hoare's Quicksort, which is the fastest or nearly the fastest sorting algorithm…

### Sorting in a paging environment

- Computer ScienceCACM
- 1970

This sorting study was part of an extensive measurement project undertaken on the M44/44X, an experimental paging system which was conceived and implemented at IBM Research in order to explore the…

### Samplesort: A Sampling Approach to Minimal Storage Tree Sorting

- Computer ScienceJACM
- 1970

A procedure is proposed which is a generalization of minimal storage tree sorting and which has the following three properties: there is a significant improvement in the expected number of comparisons required to sort the input sequence, the procedure is statistically insensitive to bias in theinput sequence, and the expected numbers of comparisons approaches the information-theoretic lower bound on the number of compared required.

### Algorithm 347: an efficient algorithm for sorting with minimal storage [M1]

- MathematicsCACM
- 1969

The real procedure gauss computes the area under the left-hand portion of the normal curve by using National Bureau of Standards formulas 26.6.4, 26.5, and 26.8 for computation of the statistic and the approximation for the approximation.

### Structured Programming with go to Statements

- Computer ScienceCSUR
- 1974

For serious students of structured programming, and also for language designers, Knuth's "Structured Programming with go to Statements" is probably the paper to read. It is by far the most complete…

### Some performance tests of “quicksort” and descendants

- PhysicsCACM
- 1974

Detailed performance evaluations are presented for six ACM algorithms, and quicksort requires the fewest comparisons to sort random arrays and qsort requires many more comparisons than its author claims.

### fundamental algorithms

- Education
- 1969

General Instructions Material: You may only use one handwritten sheet of paper (size A4, on both pages) to solve the exercises and any other material including electronic devices of any kind is forbidden.

### The art of computer programming: sorting and searching (volume 3)

- Physics
- 1973

Apparatus for supporting different nets for various sporting purposes including interengaging tubular rods which are arranged to interconnect and have ground engaging portions suitable to be useful…

### Algorithms 402: Increasing the efficiency of quicksort

- PhilosophyCACM
- 1970

A lgor i thm generates a l ist of complex primes in order of increasing modulus: the parameter m of the call is the highest modulus to be included in the list and should sat isfy m > 2.