3 ms·
"premature optimization is the root of all evils" has a lot to answer for
by zmmmmm 4y ago
"premature optimization is the root of all evils" has a lot to answer for
- pbourke 4y agoThat doesn’t mean “never optimize”
- commandlinefan 4y agoEverybody who quotes it thinks it does.
- kaba0 4y agoWhenever you hear that, add the whole quote: “ 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%”
- moring 4y agoThe full quote is: "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%." It doesn't mean "don't optimize" at all. It means: optimize those parts that actually make the application slow. I can tell from experience that intuition has repeatedly failed me about which parts those are. Measure, don't guess, before you optimize.