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

Discussion

Which of the following statements about peephole optimization is False ?

  • A.It is applied to a small part of the code.
  • B.It can be used to optimize intermediate code.
  • C.To get the best out of this, it has to be applied repeatedly.
  • D.It can be applied to the portion of the code that is not contiguous.

Answer: D

The false statement is that it can be applied to the portion of the code that is not contiguous.

Peephole optimization works on a short window of consecutive instructions, so by definition it is applied to contiguous code.

The other statements are true: it works on a small part of the code; it can be applied to intermediate code as well as target code; and one improvement often exposes another, so it gives the best results when applied repeatedly.

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

Post your comment

Please log in or register to post a comment.