3 ms·
This is the cycle of every "premature optimization" discussion, ever. Someone discounts optimization, but when countered with optimizations states that they are
by endorphone 9y ago
This is the cycle of every "premature optimization" discussion, ever. Someone discounts optimization, but when countered with optimizations states that they aren't actually optimizations.
Your root post states "In fact, most code doesn't need to be optimized at all". That is de facto meaningless if we go under the assumption that optimizing itself -- ergo implementing optimally -- doesn't count as optimizing.
- deleted 9y ago[deleted]
- rgbrenner 9y agoYou've thrown a lot of stuff under the label of optimization. Take coherent design. I started off saying everything should be written for clarity, and having a coherent design is part of that. A coherent design can mean the code has lower performance than an incoherent design. How could this possibly be considered an optimization? An optimization now includes things that reduce performance?! Edit: Also "implementing optimally" is not the definition of optimization. optimal: "best or most favorable." optimize: "rearrange or rewrite (data, software, etc.) to improve efficiency of retrieval or processing."
- endorphone 9y agoI think you should revisit the line in the linked page that you disagreed with so strongly. It doesn't say "go back and rewrite in assembly", but simply asks that you develop with performance in mind (with an awareness of the costs of the choices you are making). Your comment was that performance effectively doesn't matter, deal with that later. Optimization in the context of "premature-optimization" doesn't refer to going back and rewriting code early. It refers to a mental concern about performance, where there is a very wrong, but persistent and common, attitude that performance is something you can add later. But in most cases that simply isn't true, and it's one of the biggest lies in this industry, trotted out like it's grizzled experience and wisdom when it's the foundation of countless project failures.