“The real problem is that programmers have spent far too much time worrying about efficiency in the wrong places and at the wrong times; premature optimization is the root of all evil (or at least most of it) in programming.”

Programmers waste enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered. We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%.
Variant in Knuth, "Structured Programming with Goto Statements" http://pplab.snu.ac.kr/courses/adv_pl05/papers/p261-knuth.pdf. Computing Surveys 6:4 (December 1974), pp. 261–301, §1.
Knuth refers to this as "Hoare's Dictum" 15 years later in "The Errors of Tex", Software—Practice & Experience 19:7 (July 1989), pp. 607–685. However, the attribution to C. A. R. Hoare is doubtful. http://shreevatsa.wordpress.com/2008/05/16/premature-optimization-is-the-root-of-all-evil/
All three of these papers are reprinted in Knuth, Literate Programming, 1992, Center for the Study of Language and Information ISBN 0937073806
Source: Computer Programming as an Art (1974), p. 671

Adopted from Wikiquote. Last update June 3, 2021. History

Help us to complete the source, original and additional information

Do you have more details about the quote "The real problem is that programmers have spent far too much time worrying about efficiency in the wrong places and at …" by Donald Ervin Knuth?
Donald Ervin Knuth photo
Donald Ervin Knuth 32
American computer scientist 1938

Related quotes

C. A. R. Hoare photo

“Premature optimization is the root of all evil.”

C. A. R. Hoare (1934) British computer scientist

Quote due to Donald Knuth, "Structured Programming with Goto Statements" http://pplab.snu.ac.kr/courses/adv_pl05/papers/p261-knuth.pdf, Computing Surveys 6:4 (December 1974), pp. 261–301, §1. Knuth refers to it as "Hoare's Dictum" 15 years later in "The Errors of TeX", Software—Practice & Experience 19:7 (July 1989), pp. 607–685. However, the attribution to Hoare is doubtful. http://shreevatsa.wordpress.com/2008/05/16/premature-optimization-is-the-root-of-all-evil/
Attributed

Idries Shah photo
Lisa Scottoline photo

“Your typical suburban mom worries all the time, but she worries about the wrong things”

Lisa Scottoline (1955) American writer

Source: Every Fifteen Minutes

John F. Kerry photo

“It's the wrong war in the wrong place at the wrong time.”

John F. Kerry (1943) politician from the United States

Sept 6, 2004 http://www.nytimes.com/2004/09/07/politics/campaign/07campaign.html?ex=1095912000&en=981cad475582e618&ei=5070&hp

Marie von Ebner-Eschenbach photo

“Those who trusted at the wrong time and place will in turn mistrust at the wrong time and place.”

Marie von Ebner-Eschenbach (1830–1916) Austrian writer

Der am unrechten Orte vertraute, wird dafür am unrechten Orte mißtrauen.
Source: Aphorisms (1880/1893), p. 29.

Ward Cunningham photo

“I can't tell you how much time is spent worrying about decisions that don't matter.”

Ward Cunningham (1949) American computer programmer who developed the first wiki

A Conversation with Ward Cunningham (2003), Collective Ownership of Code and Text
Context: I can't tell you how much time is spent worrying about decisions that don't matter. To just be able to make a decision and see what happens is tremendously empowering, but that means you have to set up the situation such that when something does go wrong, you can fix it.

Shashi Tharoor photo
George Lucas photo

“They were at the wrong place at the wrong time naturally they became heroes”

George Lucas (1944) American film producer

Source: A New Hope

Related topics