3 ms·
> Why isn't optimization a repeated process? Apply some sequence of operations in a loop until diminishing gains are detected? Compile time. Compiler optimizat
by jcranmer 8y ago
> Why isn't optimization a repeated process? Apply some sequence of operations in a loop until diminishing gains are detected?
Compile time. Compiler optimizations are a tradeoff between code size, running time, and compile time, complicated by the fact that that sneezing at your code can change performance by 40% or more and the fact that correctness comes with steep performance costs and often isn't actually desired (until it really is).
Of all the optimizations, inlining is probably the worst for the difficulty of balancing the triad of objectives and the black magic of its heuristics.