2 ms·
The misquote, in my experience, is abusing the "premature" aspect. It's often thrown around as time-based but my understanding of the original quote is that it'
by andrewstuart2 3y ago
The misquote, in my experience, is abusing the "premature" aspect. It's often thrown around as time-based but my understanding of the original quote is that it's all about assumptions rather than data driving complexity in the name of optimization.
Optimization should have measurable improvement and the need for it should be demonstrable. Neither of these is harder than writing a benchmark and/or performing some simple math on data measured for that purpose before going about the optimization.
- mcpackieh 3y agoThe quotes from wikiquote: > "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." and another instance of the same: > "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%." https://en.wikiquote.org/wiki/Donald_Knuth#Computer_Programming_as_an_Art_(1974) https://en.wikiquote.org/wiki/Donald_Knuth#Computer_Programm... I'm not really seeing much of a "misquote" to be honest. I have always understood this quote to mean that spending too much time micro-optimizing things unnecessarily will waste your time and become a burden to you later. Instead, optimizations should only be performed when the need for optimization becomes manifest.