3 ms·
The full quote is much much more reasonable: "We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all e
by gpderetta 6y ago
The full quote is much much more reasonable:
"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%"
Unfortunately everybody seems to forget about the last bit.
- vonmoltke 6y agoI think the first bit, that is also always dropped, is also important: "We should forget about small efficiencies". Removed from that context, it has morphed into an excuse by some people to not pay attention to efficiency at all, even when the potential gains are large for a relatively small amount of work.
- mumblemumble 6y agoThere's also a tendency to forget the impact of framing. One or two micro-optimizations may not add up to much. But a habit of, say, avoiding unnecessary object churn, might add up to a very large efficiency gain, a few microseconds at a time.
- commandlinefan 6y agoEspecially considering the source: Knuth was a ruthless micro-optimizer, but his micro-optimizations actually made sense.