Which of the following statements about peephole optimization is False?

20112025

Which of the following statements about peephole optimization is False?

  1. A.

    It is applied to a small part of the code

  2. B.

    It can be used to optimize intermediate code

  3. C.

    To get the best out of this, it has to be applied repeatedly

  4. D.

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

Attempted by 45 students.

Show answer & explanation

Correct answer: D

Peephole optimization operates on a small, contiguous window of instructions. Option 3 is false because it claims peephole optimization applies to non-contiguous portions, which contradicts the definition of this technique.

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

Explore the full course: Isro