2 ms·
It sounds like that, but turns out that those are extremely hard optimizations to do as they require whole program analysis.
by gpderetta 3y ago
It sounds like that, but turns out that those are extremely hard optimizations to do as they require whole program analysis.
- MereInterest 3y agoAlso, 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.