4 ms·
Also, because they involve trade-offs. Ideally, a compiler optimization would result in code that is better in every measurable aspect. For example, dead code
by MereInterest 3y ago
Also, because they involve trade-offs. Ideally, a compiler optimization would result in code that is better in every measurable aspect. For example, dead code elimination results in a smaller binary, fewer branch points, and fewer runtime computations. Array padding, on the other hand, requires a larger memory footprint to accommodate the padding.
If an optimization is only beneficial in some cases, compiler authors are rightfully wary of enabling it in all cases.