3 ms·
To be fair, this is just an example to illustrate the larger point, which, to me, seems to be that it is sub-optimal to be dogmatic over statements like "premat
by mannykannot 7y ago
To be fair, this is just an example to illustrate the larger point, which, to me, seems to be that it is sub-optimal to be dogmatic over statements like "premature optimization is the root of all evil".
It seems plausible to me that halting the re-architecting project would produce the savings claimed.
- rhizome 7y agoNot all optimization is premature!
- mannykannot 7y agoPrecisely -- dogmatism fails because it does not deal with situations that call for sometimes subtle, case-by-case judgement.
- theonemind 7y agoIn general, I’ve found some of the worst thinking in otherwise smart people from ideological thinking. My self-destructing rule of thumb is “don’t be an ideologue”.
- gwd 7y agoBut this isn't at all an example of "premature optimization". There was a well-defined, long-term issue they were having, and someone fired up a profiler, and showed that a particular change had a massive impact. That's exactly the opposite of "premature optimization".
- mannykannot 7y agoI think it is supposed to be an example of just-in-time optimization that almost did not happen. The implication seems to be that the architects did not even consider code-level optimization as a possible solution. Maybe the better message is "try to understand the causes of your problem before you try to solve it."
- cryptonector 7y agoPreallocating space you won't need is premature optimization. I think that's what TFA meant to say, and maybe even said it, who knows.
- bryanrasmussen 7y agothe original premature optimization text posited scenarios where complicated algorithmic patterns were implemented (that took a significant amount of development time) before it was found out whether they were needed or not. I think this is more Obvious and simple optimizations are beneficial. I feel in the case of this optimization it also improves the code by making it more clear what is wanted. I think that is likely often the case with simple optimizations.