Skip to main content

Experiments for Algorithm Engineering

  • Conference paper
  • First Online:
Computing and Combinatorics (COCOON 2003)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2697))

Included in the following conference series:

  • 877 Accesses

Abstract

Hoare introduced and analyzed the Quicksort algorithm in the early 1960s 6. By the early 1970s, a highly tuned version of that algorithm was implemented in the Unix system’s main memory sort function, qsort. For two decades, that code performed admirably.

In the early 1990s, Alan Wilks and Rick Becker once again used that old, reliable program, and were stunned by the results. A run that should have taken a few minutes was cancelled after hours. They studied their input data and eventually produced an eight-line program that showed that their run would have taken weeks. They enclosed that program in a superb bug report that they e-mailed to me (details are described by Bentley [1]). They had stumbled across a problem that Hoare had foreseen: selection of the partitioning element. An implementation cleverness that had stood the test of two decades worth of time had finally failed catastrophically.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. J. L. Bentley. Software Exploratorium: The Trouble With Qsort, UNIX Review, Vol. 10,2, pp. 85–93, February 1992.

    MathSciNet  Google Scholar 

  2. J. L. Bentley. Software Explorations: Cost Models for Sorting, UNIX Review, Vol. 15,4, pp. 65–72, April 1997.

    Google Scholar 

  3. J. L. Bentley. Programming Pearls, Second Edition, Addison-Wesley, Reading, MA, 2000.

    Google Scholar 

  4. J. L. Bentley and M. D. McIlroy. Engineering a sort function, Software-Practice and Experience, Vol. 23,1, pp. 1249–1265, 1993.

    Article  Google Scholar 

  5. J. L. Bentley and R. Sedgewick. Fast Algorithms for Sorting and Searching Strings, Proceedings of the 8th Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 360–369, January 1997.

    Google Scholar 

  6. C. A. R. Hoare. Quicksort, Computer Journal, Vol. 5,1, 1962.

    Google Scholar 

  7. M. D. McIlroy. A killer adversary for quicksort, Software-Practice and Experience, Vol. 29, pp. 341–344, 1999.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2003 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Bentley, J. (2003). Experiments for Algorithm Engineering. In: Warnow, T., Zhu, B. (eds) Computing and Combinatorics. COCOON 2003. Lecture Notes in Computer Science, vol 2697. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45071-8_2

Download citation

  • DOI: https://doi.org/10.1007/3-540-45071-8_2

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-40534-4

  • Online ISBN: 978-3-540-45071-9

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics