← Back to context

Comment by wfunction

13 years ago

> > In reality, "premature optimization is the root of all evil" is advice given to new programmers

> It's also for experienced programmers who dink around with macro-optimizations.

The hilarious thing is that everyone seems to think everyone else's optimizations are premature.

Don't believe me? Just go ahead and ask someone an optimization question, like maybe on StackOverflow. Those who respond might not know you, but I'll be damned if their first reply isn't to tell you that you probably shouldn't even be optimizing in the first place, because obviously if you'd thought about it more carefully, you'd have realized it's premature.

If you don't want people to tell you that your optimization is premature, then make sure to mention your profiler results.

  • Is experience worth nothing?

    Do you have to spend all your time and resources architecting the system poorly the first time, just to "prove" that you are wrong -- even though you knew it would happen before you even started coding?!

    That's like telling an engineer to prove (by actually building it and subjecting it to a lot of stress) that the bridge he designed would be prone to collapsing before helping him find a better design!

    • It's just a simple fact about the signal-to-noise ratio on a public Q&A site. Almost all optimization questions will be premature optimization questions. Including any evidence that you know what you're doing makes your question stand out. But just claiming to know what you're doing is indistinguishable from a common form of noob arrogance.