Another question about premature optimization

Knuth said: We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil

I'm curious how he came up with 97%. Could someone please share something about this?

UPDATE: The problem is: This sentence is written in a research paper, how come a subjective statement get accepted in such formal document?


80% of all statistics are made up on the spot, including this one.

I think you'll find that Jon Skeet has the right idea.


I don't believe it was meant to be taken as an exact number at all. Just "almost all the time."


I don't believe it was supposed to be taken literally. There are some circumstances and environments in which optimization is paramount (and hence the 97% rather than say, 99%), but for the majority of programmers, writing the majority of software, the majority of the time - optimization should occur only when necessary, and after proper profiling.

链接地址: http://www.djcxy.com/p/6728.html

上一篇: 在慢速机器上开发是否过早优化?

下一篇: 关于过早优化的另一个问题