Which of the following comment about peep-hole optimization is true?
2018
Which of the following comment about peep-hole optimization is true?
- A.
It is applied to small part of the code and applied repeatedly
- B.
It can be used to optimize intermediate code
- C.
It can be applied to a portion of the code that is not contiguous
- 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.