Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



I 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.


There'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.


Especially considering the source: Knuth was a ruthless micro-optimizer, but his micro-optimizations actually made sense.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: