4 ms·
Yeah that "premature optimization..." trope always bugs me. It is not a license to write the most non-performant code you can think of and then spend hours and
by Hominem 16y ago
Yeah that "premature optimization..." trope always bugs me. It is not a license to write the most non-performant code you can think of and then spend hours and hours tuning it later. That phrase was coined back when optimization meant inlining assembly, not simply putting some thought into your algorithms.
Part of the problem is TDD, people see the green bars fill but the customer regects it because guess what. In real world usage we arent running the method once, we are running it millions of times.
- itgoon 16y agoThe operative word is "premature". Optimize when it is time to optimize - the OP touches on that. If you know a given routine will be run a lot, then some optimization right off the bat is a good idea. Now, that "knowing" is a little more difficult, but comes with user feedback and experience.