2 ms·
>Make it work, make it pretty, make it fast, in that order. And don't optimize without measuring, another trap that many people (present company included) fall
by t8sr 3y ago
>Make it work, make it pretty, make it fast, in that order. And don't optimize without measuring, another trap that many people (present company included) fall into.
This view is common nowadays, but I think people need to dial that back by maybe 30%. Too often, it's used as an excuse for software that's extremely wasteful, when with minimal tweaks it could be efficient.
I am a "simplicity uber alles" kinda guy, and even I think you should add a line of code if it'll shave off half the runtime.
I've heard people quote this, and the infamous Donald Knuth line, as an excuse for not knowing how to do basic things, like binary search. I've even heard people complain about caching network IO without a benchmark to show RAM is faster than DNS.
Programmers, more than other people, have a tendency to take a pithy soundbite and make it their life philosophy, and I'm saying it's better not to.
- toast0 3y agoThere's premature optimization and there's mature optimization... Searching with something other than linear scan when searches happen often over meaningfully large search spaces is a mature optimization. Avoiding network requests by using a cache is a mature optimization (with all of the pitfalls that come with caching)
- t8sr 3y ago/me sips Alamo from the can Yep.