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*

2
  • 8
    In fact, Knuth is very much pro-optimization (some observations in this tweet and replies)—and he wrote that sentence more in the sense of "sure, sure, I agree premature optimization is bad, let's agree to call it the most evil thing, but look, a careful use of goto in inner loops can give a 12% speedup; why would you give that up?" Commented Jun 17, 2021 at 6:50
  • 1
    @ShreevatsaR I think the phrase all hinges on the understanding of what "premature" actually is to the programmer. For me this is optimizing without having tested the performance beforehand and actively searching for solutions that are not in your repertoire. If you already know a more optimized version in your head, an optimization is not "premature" if you just apply it. The opposite would be called premature pessimisation which I think is a bigger issue. Commented Apr 9, 2024 at 6:56