3 ms·
I always like to add the whole quote: “We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet
by kaba0 5y ago
I always like to add the whole quote: “We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%.”
I see it way too often that someone wastes way too much time with optimizing a code that is run only once with like 3 items. So I still think the measure and optimize later is still true. With today abstractions noone can really tell what will be a bottleneck — even just the CPU has an insane amount of complexity going on with reordering and branch-predictions. Even the seemingly faster code can be an order of magnitude slower surprisingly.
- giantrobot 5y ago> So I still think the measure and optimize later is still true. This is a huge issue because measurement is difficult. There's also a lot of developers that are bad at measuring and interpreting the results when they do measure. So you end up with people writing unoptimized or just plain slow code with // TODO: Add measurements. Then complicate the whole thing by simply accepting bad performance and scaling horizontally and paying through the nose.
- kaba0 5y agoWell, I wouldn’t trust their ability to optimize code either if they can’t even properly benchmark something so there is that.