Settings

Theme

Premature optimization is the root of all evil

wiki.c2.com

1 points by serb348 9 years ago · 2 comments

Reader

cafard 9 years ago

Didn't Knuth say "much evil"? I don't think I have my copy of the book with that essay any more, but that's how I remember it.

  • grzm 9 years ago

    From the article, which quotes Knuth:

    In Donald Knuth's paper "Structured Programming With Go To Statements", he wrote: "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%."

    Here's a link to the source paper, which confirms the quote:

    https://www.cs.sjsu.edu/~mak/CS185C/KnuthStructuredProgrammi...

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection