Which of the following comment about peep-hole optimization is true?

2018

Which of the following comment about peep-hole optimization is true?

Answer: A. It is applied to small part of the code and applied repeatedlyPeep-hole optimization is a standard compiler technique that operates on small, contiguous windows of code instructions to improve efficiency. It works by…

  1. A.

    It is applied to small part of the code and applied repeatedly

  2. B.

    It can be used to optimize intermediate code

  3. C.

    It can be applied to a portion of the code that is not contiguous

  4. D.

    None of these.

Attempted by 175 students.

Show answer & explanation

Correct answer: A

Peep-hole optimization is a standard compiler technique that operates on small, contiguous windows of code instructions to improve efficiency. It works by examining a local window of the intermediate code, applying optimizations, and repeating this process until no further improvements can be made (convergence).

Explore the full course: Compiler Design

Loading lesson…