3 ms·
The 80/20 rule tends to give you significantly different returns on optimization, depending on what code you optimize. Then, there are other priorities to consi
by stcredzero 10y ago
The 80/20 rule tends to give you significantly different returns on optimization, depending on what code you optimize. Then, there are other priorities to consider, like optimizing for programmer reads. By all means, if you can write easier to understand code by writing efficient code, then do so.
"the first thing that comes to mind even if it's actually horribly stupidly inefficient"
There are certain practices, like the "Law of Demeter" and the "Replace Temp with Query" refactoring that are deliberately inefficient for the purpose of making refactoring and code changes easier. I think of these as being somewhat like a filing system that leaves a little bit of inefficiency to facilitate later reorganization.