Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

12
  • 34
    I think you need to distinguish between premature optimization, and unnecessary optimization. Premature to me suggests 'too early in the life cycle' wheras unncessary suggests 'does not add significant value'. IMO, requirement for late optimization implies shoddy design. Commented Oct 17, 2008 at 8:53
  • 161
    Yes, but evil is a polynomial and has many roots, some of them are complex. Commented May 29, 2011 at 12:31
  • 9
    You should consider, that Knuth wrote this 1974. In the seventies it was not that easy to write slow programs as it is nowadays. He wrote with Pascal in mind and not with Java or PHP. Commented Oct 2, 2013 at 13:51
  • 4
    "which basically moved instances of Java Format classes into a thread local, since they are not thread safe" is not premature optimization. The "and 'relatively expensive' to create" is a secondary justification. Removing a danger to threading by itself probably justifies the change (weasel word 'probably' because I don't know what threading y'all are doing). A combination of removing a logic / race /threading risk along with reducing some performance risk should be acceptable. The only quibble would be if there were large, unresolved problems unrelated to these left to be resolved. Commented Dec 11, 2014 at 19:12
  • 21
    @ceving In the 70 it was as easy as today to write slow programs. If you choose the wrong algorithm or the wrong data structure then BAM! Bad performance all over the place. One could argue the other way around. Today that are a lot more tools and should be inexcusable that a programmer still write software that suffers at the most basic save operation. Parallelism became almost a commodity and we still suffer. Slow performance can't be blamed on the language or tool or CPU or memory. It's a delicate balance of so many things which is why it's nearly impossible to optimize early. Commented Jan 15, 2015 at 12:19