This quote is from an era where hardware resources were at such a premium that developers obsessed excessively over the performance impact of every line of code.
This quote is from an era where hardware resources were at such a premium that developers obsessed excessively over the performance impact of every line of code.
No, don't go down a micro-optimization rabbit hole when making the first rough prototype.
Yes, do stop to think for 10 seconds to think how much use this code path will get and if there is a better way of doing it that will require similar amount of work to complete.
You're absolutely right that the 97% number comes from a different time, but the central phrase is approximately as true as it ever was. The trick is that it can be really hard to determine whether a given optimization is premature. Like "one of the hardest things a working programmer will ever attempt" hard.
One more thing: We optimize for factors other than CPU time, and all of the above still applies.
That quote was warning exactly about this kind of optimization, and it's foolish to trade anything (development time, maintainability, whatever) for that optimization without a business case and measurements.