notes provisional
Premature Optimization
Knuth's full quote on premature optimization and how the slogan gets misused
Premature Optimization
“Premature optimization is the root of all evil” is a famous quote by Donald Knuth that is frequently misused as a thought-terminating cliché.
The full quote from Knuth’s 1974 paper “Structured Programming with go to Statements” reads:
“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%.”
Knuth was demanding discernment: engineers are expected to know which code is the 97% and which is the 3%. Today, the phrase is often wielded to avoid measuring or profiling entirely, laundering a gut feeling into received engineering wisdom.