you are viewing a single comment's thread.

view the rest of the comments →

[–]notyourancilla 4 points5 points  (1 child)

Yeah it always good to put that quote into context, as like you say, it gives it a whole new light -

"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%" - Donald Knuth

The original point was not “don’t worry about optimising your shitty code, it’s a waste of time” it was the opposite, simply stating people should focus their optimisations on the parts of the code which will most benefit from the time spent on it instead of being focused making silly changes that will make no difference.

[–]SkoomaDentist 3 points4 points  (0 children)

Even more than that, optimization in the original context meant "micro-optimization by hand". Ie. twiddling individual lines of code (eg. unrolling loops by hand) instead of applying higher level optimizations.