When people hide behind this saying, it’s probably because they are misquoting it, the same way people misquote the saying “The love of money is at the root of all kinds of evil”. (The quote this article is about is an adaptation of this biblical saying). You see, it’s not money, it’s the love of money. Big difference.
Donald Knuth (or Tony Hoare) did not intend to mean that you should not optimize. It’s premature optimization that’s the problem. What is means is: Focus on getting it to work before focusing on improving its performance.
The problem with focusing on performance first is that it will lead you down all sorts of wormholes that may significantly alter the structure of the solution and prevent you from getting a simple, working solution in the first place, or hamper your efforts severely.
That is not to say you shouldn’t go back and work on the performance.
In your .NET example, as with many, the developer apparently neglected to look at the performance after implementing the functionality. It does not negate the validity of the saying in any way.
That said, there are definitely situations where having a working solution that is simple to maintain trumps getting it running at the fastest speed possible. The fact that the most successful frameworks are written in higher level scripting languages, as opposed to C, should be considered evidence of this.
Remember it’s premature optimization, not optimization that is the evil. Don’t be one of those “money is the root of all evil” people.




