Straight from today’s Quotle — here’s who really said it, and the story behind it. Play again

Who really said it

Premature optimization is the root of all evil

Written by Donald Knuth
Attribution status: Verified Reuse status: In copyright

Knuth wrote the line, in these exact words, in “Structured Programming with go to Statements,” published in ACM Computing Surveys in December 1974 — it sits on page 268 of the scanned paper. What almost never travels with it is the sentence that follows, in which Knuth insists the critical 3% of code should be optimized.

Last verified 22 Jul 2026 · how we verify · spot an error?

For presentations

Put it on a slide

Verified quote & credit

“Premature optimization is the root of all evil” Donald Knuth, "Structured Programming with go to Statements," ACM Computing Surveys 6, no. 4 (December 1974): 261–301, at 268. Verified by Quotle.info.

Can you use it?

Still under copyright (rights held by Donald E. Knuth and the Association for Computing Machinery (publisher of Computing Surveys)). A short, credited quote is generally fine for talks, teaching, and internal decks; for commercial, published, or large-scale reuse, get permission.

Image direction — grounded in this quote’s real context; paste into your image tool

In context

Evoking the world of Donald Knuth — American computer scientist · Stanford professor emeritus. Theme: "Premature optimization is the root of all evil". Atmospheric and restrained, cinematic directional light, a muted period-appropriate palette, fine grain and texture. Compose with generous empty space for the quote and a small credit line. No lettering in the image itself.

Minimalist

Minimalist editorial slide for the quote "Premature optimization is the root of all evil". Clean background, a single muted accent color, generous negative space, subtle paper or linen texture, no literal illustration — let the words carry it. Reserve clear space for a serif quote and a small credit line. No lettering in the image itself.

Provenance

The source, confirmed

Work
Structured Programming with go to Statements
Published
ACM Computing Surveys 6, no. 4 (December 1974): 261–301
Page
268
Also in
“Computer Programming as an Art,” Communications of the ACM 17, no. 12 (December 1974) — a hedged variant

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%. Excerpt

Quoted from page 268 of the scanned paper. The preceding sentences describe programmers wasting time on the speed of noncritical code; the following ones urge close attention to critical code — but only after it has been identified.

Read the 1974 paper (scan, PDF)

How we verified this

  • The exact sentence appears on page 268 of the December 1974 Computing Surveys paper — confirmed in the full scan ↗, under the running head “268 • Donald E. Knuth.”
  • Knuth used a softer version the same year in his Turing Award lecture, adding the qualifier “(or at least most of it) in programming” — visible in the archived lecture text ↗.
  • Wikiquote’s sourced entry ↗ carries both 1974 wordings and notes that Knuth called the saying “Hoare’s Dictum” in his 1989 paper “The Errors of TeX,” adding that the attribution to Hoare is doubtful.
  • Hoare, asked about it in 2004, said he had no recollection of how the quotation came about — reproduced in this provenance write-up ↗.
Know a source that supports or challenges this? Add a link →

Paste a URL and we’ll check it. This doesn’t change the page — it goes to our review queue, and if it holds up we update the record with a citation.

Fact-check

The credit that keeps going to the wrong man

This one is unusual: the quote is genuine, the author is famous, and the misattribution was started by the author himself.

The most commonC. A. R. Hoare Doubtful

In his 1989 paper “The Errors of TeX” Knuth referred to the saying as Hoare’s dictum — apparently having forgotten he wrote it. Wikiquote records that reference and states plainly that the attribution to Hoare is doubtful ↗.

OccasionalEdsger W. Dijkstra Unsupported

Asked in 2004 where the line came from, Hoare replied that he had no recollection of it and guessed he might himself have credited Dijkstra — a guess, not a source, as the provenance write-up documents ↗.

Right author, wrong quoteDonald Knuth (truncated) Mis-worded

The sentence is almost always quoted alone. In the 1974 paper ↗ it is preceded by “say about 97% of the time” and followed immediately by a warning not to pass up the critical 3%.

Knuth wrote it, in December 1974, on page 268 of “Structured Programming with go to Statements” ↗ — and then, in 1989, credited it to someone else.

Context

Why the missing half matters

Knuth was not telling programmers to stop caring about speed. The paragraph the line comes from is an argument for efficiency — he opens it by complaining that people were then “condemning program efficiency,” and he ends it by insisting the genuinely hot 3% of a program deserves careful attention, once you have measured which 3% it is. The famous sentence is the middle of a sandwich, served without its bread.

The same 1974 essay is where Knuth reports his own measurements of where programs actually spend their time, which is why the “97% / 3%” framing is not rhetorical decoration. Strip it away and the aphorism flips from “measure first” into “never optimize” — a reading Knuth spends the surrounding pages arguing against.

The quote is real. The version most people carry around is missing the half that makes it advice.

Explore

Filed under

More provenance-checked quotes on the same theme, each with its reuse status.

Go further

Dig deeper

Trusted places to keep pulling the thread — primary archives, fact-checks, and scholarship. We show how we used each one before you leave.

The true author

Who was Donald Knuth?

Donald Knuth

Born 1938 · American computer scientist · Stanford professor emeritus

Donald Ervin Knuth (born 10 January 1938) is an American computer scientist and professor emeritus at Stanford University, best known for the multi-volume The Art of Computer Programming and for creating the TeX typesetting system. He received the ACM Turing Award in 1974 — the same year he published both texts in which this sentence appears. Knuth is a meticulous citer of sources, which makes the central irony here delicious: the one attribution he got wrong was his own.

For writers & researchers

Cite this

Cite this source

Knuth, Donald E. “Structured Programming with go to Statements.” ACM Computing Surveys 6, no. 4 (December 1974): 261–301, at 268.

This verification page

Quotle.info. “Who really said ‘Premature optimization is the root of all evil’?” Last verified 22 Jul 2026. https://quotle.info/who-said/premature-optimization-is-the-root-of-all-evil/

Copied