Machine-translated by Google. Questions are authored in English.
Top

Discussion

The single most productive optimisation in most compilers is generally

  • A.the removal of each and every conditional branch from the code
  • B.a combination of many modest transformations rather than any one
  • C.loop unrolling applied as aggressively as possible
  • D.function inlining of every call in the program

Answer: B

Correct answer: a combination of many modest transformations rather than any one

No single transformation dominates. The gains come from many modest ones applied together and reinforcing each other - inlining exposing constants, propagation exposing dead code, code motion exposing common subexpressions. This is also why the phase ordering problem matters so much and why any one optimisation pushed to an extreme tends to lose more than it gains.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.