logoalt Hacker News

bombcartoday at 2:25 PM3 repliesview on HN

This is the moral behind "premature optimization is the root of all evil" - you could say preconceived just as easily.


Replies

embedding-shapetoday at 2:43 PM

> you could say preconceived just as easily

Would have saved us from all the people who reject any sort of optimization work because for them it is always "too early" since some product team wanted their new feature in production yesterday, and users waiting 5 seconds for a page load isn't considered bad enough just yet.

show 1 reply
TeMPOraLtoday at 3:28 PM

Counterpoint: data driven development often leads to optimizations like this not being made because they're not the ones who are affected, their customers are. And software market is weird this way - little barriers to entry, yet almost nothing is a commodity, so there's no competitive pressure to help here either.

PunchyHamstertoday at 4:37 PM

Honestly looking over time I think that phrase did more bad than good.

Yes, of course you shouldn't optimize before you get your critical path stable and benchmark which parts take too much.

But many, many times it is used as excuse to delay optimisation so far that it is now hard to do because it would require to rewriting parts that "work just fine", or it is skipped because the slowness is just at tolerable level.

I have a feeling just spending 10-20% more time on a piece of code to give it a glance whether it couldn't be more optimal would pay for itself very quickly compared to bigger rewrite months after code was written.