3 ms·
Quoting this phrase is a major pet peeve of mine. In an age where applications struggle to do such simple things as displaying text and images when running on s
by andrepd 3y ago
Quoting this phrase is a major pet peeve of mine. In an age where applications struggle to do such simple things as displaying text and images when running on supercomputers 10,000x as fast as the ones Knuth had when he wrote this, you know the problem isn't "too much optimisation".
What Knuth means is "don't waste time microptimising parts of your code which aren't bottlenecks anyway". Yet when this is cited it's basically taken as "don't give a thought about optimisation until later on, instead do things the easiest way for you as a dev".
- devnullbrain 3y agoIt's also just something that all engineers do. EEs don't concern themselves about the power-draw of an LED on a space heater. MEs don't work hard to make a piston last 100 years in an engine that will last 10. It boils down to 'focus on important things, not unimportant things'.
- crabmusket 3y ago> don't waste time microptimising parts of your code which aren't bottlenecks anyway The irony is that doing so barely optimises anything. The optimisations aren't so much premature as... Not optimisations. I'm a big fan of Casey Muratori's video where he compares 3 things commonly called optimisation: - actual optimisation, which is detailed work involving profilers and evidence - fake optimisation, like using fast inverse square root in a web app because you heard it was faster - non-pessimization, where you just try to write straightforward code without introducing major performance regressions without good reason "Premature optimisation" is probably just "fake optimisation".