top | item 21923701

(no title)

greyfade | 6 years ago

> I think Knuth (in his famous "... root of all evil" quote) was referring specifically to programming, and to spending time on optimizations prior to functional completion.

What he said is, quote, "... we should forget about the small efficiencies, say, about 97% of the time" and "we should not pass up our opportunities in that critical 3%."

What he was talking about in the article[1] is the tendency of programmers to concern themselves with the efficiency of things like the modulo operator, when much larger efficiencies are far more important, such as the design of the algorithm or data structures.

Premature optimization, as when deciding that this small efficiency is important enough to optimize, causes you to forget about the larger efficiencies that cause your program to be slow.

[1] https://web.archive.org/web/20130731202547/http://pplab.snu....

discuss

order

No comments yet.