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

2018

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

  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 64 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).

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Isro