4 ms·
John Henry won the race against the steam-hammer too, before he died. The point is not that it's impossible to beat a good compiler at micro-optimization, the p
by InclinedPlane 16y ago
John Henry won the race against the steam-hammer too, before he died. The point is not that it's impossible to beat a good compiler at micro-optimization, the point is that it's rarely worth the effort. More important than being able to beat the compiler at optimizing any given piece of code is building the tooling (and having the discipline and experience) to know when and where to best leverage your development efforts in optimization.
Rather than trying to carpet-bomb everywhere with micro-optimization hand-grenades, use laser guided precision to hit the targets that count. So instead of wasting your time manually unrolling loops in code that's just going to be refactored away before release anyway, find out exactly where your code is bogging down and concentrate on fixing that.