3 ms·
Agreed with the general point, but it doesn't apply here. Memory locality can be objectively measured (e.g. with last level cache miss counters), and parent com
by jmoss20 3y ago
Agreed with the general point, but it doesn't apply here. Memory locality can be objectively measured (e.g. with last level cache miss counters), and parent comment is correct besides -- it's usually plain to see in the code.
There are mysterious boogiemen in performance optimization, but this isn't really one of them.
- mejutoco 3y agoI am happy (good) science does not take the "is obvious" claim as sufficient, and instead focuses on proving things with objective facts. I am not saying these cannot be plain to see in the code, but the best standard IMO is still to measure before and after the optimization. IMHO, again, you can skip that step, but then other people might rightfully ask you what proof you have that the optimization is faster (I would).
- meheleventyone 3y agoSome of these architectural decisions benefit from being made early. That doesn’t mean you can’t objectively defend them but it does mean the measure, optimize, measure loop you might use on a mature codebase to optimize a hot path can’t be the only standard.
- jmoss20 3y agoIt's a matter of economy-- if you spent all day measuring obvious things you'd never get anything done. Clearly which things you choose to measure should be a function of how certain you are about them, and how much you stand to lose if you get them wrong.