News for hackers. Stuff that matters.
Re:Optimizing Your Web App 100x Is Like Adding 99 Servers by gameswithgo on Friday November 20, 2020 @06:48PM (#25166549)
premature optimizations being bad is a tautology.

optimizations that are not premature are a win though, and by making it standard to consider performance issues from the outset, you and tour team get better at it, such that it doesn’t cost time to default to pretty efficient solutions.

also some basic tech choices can often get you large constant factor wins without any downsides, like using a languages that are at least jitted rather than interpreted.

Re:Optimizing Your Web App 100x Is Like Adding 99 Servers by ZephyrBlu on Friday November 20, 2020 @07:45PM (#25166890)
It's not a tautology, the parent comment clearly outlined some very good reasons for not prematurely optimizing things.

- "At the end there are a lot of changes all the time to functionality and implementation and optimizations early get wasted very quickly"

- "optimizations are opportunity losses at the beginning of a product"

Re:Optimizing Your Web App 100x Is Like Adding 99 Servers by ALittleLight on Friday November 20, 2020 @08:12PM (#25167065)
It is a tautology because the word "premature" means "before you have to" in this context. It's like saying "You don't need to do things before you need to need to do them." It's true by definition.

The question is: which optimizations are premature and which aren't?

Re:Optimizing Your Web App 100x Is Like Adding 99 Servers by kaoD on Friday November 20, 2020 @10:03PM (#25167586)
I'd say it's not only a tautology, it's plain false.

Cheap optimizations that are known to work (compiling in release mode, enabling HTTP cache in your web server, using a fast sorting algorithm on large arrays...) are good even if you don't need them right now.

Re:Optimizing Your Web App 100x Is Like Adding 99 Servers by yipbub on Friday November 20, 2020 @10:52PM (#25167744)
> I'd say it's not only a tautology, it's plain false.

And that, my friends, is a contradiction!

Re:Optimizing Your Web App 100x Is Like Adding 99 Servers by cortesoft on Friday November 20, 2020 @10:13PM (#25167624)
That would mean they aren't premature
Re:Optimizing Your Web App 100x Is Like Adding 99 Servers by fendy3002 on Saturday November 21, 2020 @05:14AM (#25168826)
But the question still valid, which are and which aren't (premature)? For experts: avoiding n+1 query, using hash map rather than loop match, caching in memory, using smaller data type, all are standard optimization techinques.

Now if junior doesn't implement them, are they didn't do required optimization, or do they do premature optimization if they did?

Re:Optimizing Your Web App 100x Is Like Adding 99 Servers by mgkimsal on Saturday November 21, 2020 @08:17AM (#25169568)
"premature" is in the eye of the beholder... (or implementer). I've cleaned up a lot of slow code over the last few years, and in most cases the 'fixes' are pretty simple. The pushback was typically along the lines of "YAGNI" and "premature optimization is the root of all evil" quotes, yet... yeah, you know what, we ARE "gonna need it", and adding a table index on a column you're querying on in a where clause isn't "premature". It's industry standard practice.
Re:Optimizing Your Web App 100x Is Like Adding 99 Servers by natchy on Saturday November 21, 2020 @12:27PM (#25171073)
You don’t NEED them. They are premature. I don’t technically need to compile my app in release-mode as a small startup.
Re:Optimizing Your Web App 100x Is Like Adding 99 Servers by hinkley on Friday November 20, 2020 @09:22PM (#25167422)
I think what the others are trying to say is that 'premature' is generally a label applied in hindsight.

The preparations you made that turned out to make your life easier, the things you regret not doing, and the things that ended up being a total waste of time.

Re:Optimizing Your Web App 100x Is Like Adding 99 Servers by jtbayly on Friday November 20, 2020 @08:11PM (#25167053)
premature optimizations are by definition premature and that’s what makes it a tautology.