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

Discussion

Function inlining replaces a call by

  • A.a copy of the callee's body with the arguments substituted
  • B.a jump to the callee that avoids saving any registers at all
  • C.a table lookup of the value the function would return
  • D.nothing at all

Answer: A

Removing the call overhead is only part of the gain; the larger benefit is that the body can then be optimised in the context of its caller. The cost is a larger program. Constants passed as arguments often propagate deep into the inlined body.

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

Post your comment

Please log in or register to post a comment.