Several questions on SO that ask, "Which of these is faster?" or "Why is this faster than the alternative?" have one or more answers explaining the downsides of premature optimization and suggest the user profile their code to identify bottlenecks first.
I am (personally) disappointed seeing "Premature optimization is bad!" answers get up-voted on questions that are:
- Generally reasonable.
- Interesting! Performance comparisons are fun to read about, even if they're not often useful. This is the internet. (Pictures of cats are not particularly useful ;-)
Could we have the first person inclined to mention premature optimization in their answer reference the Is premature optimization really the root of all evil? question in a separate community-wiki-mode answer?
By doing so, we'd be centralizing our information a bit (DRY) allowing people to vote the premature optimization post up or down as they feel it's applicable. Personally, I'd prefer to read the (often interesting) meat of the discussion without seeing the same meta-discussion again and again.
It's a somewhat different story when the OP clearly doesn't understand that what they're doing is an attempt to optimize. In that case pointing out the evils of premature optimization is a reasonable response. But when the question is along the lines of "Which is faster?" the question is specifically about optimization and any discussion of premature optimization is not a reasonable response.
It's also different if you have specific information as to why this would be premature optimization. However just reciting the Knuth quotes seems silly, redundant, and not worthy of reputation.
Maybe other users don't feel the same way that I do - I just figured I'd throw it out there as I've seen it happen a few times now.