COMPUTER SCIENCE AND ENGINEERING
COMPILER DESIGN
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
It is applied to a small part of the code
|
|
It can be used to optimize intermediate code
|
|
To get the best out of this, it has to be applied repeatedly
|
|
It can be applied to the portion of the code that is not contiguous
|
Detailed explanation-1: -Explanation: In peephole optimization a small portion of code need not be contiguous and it is replaced by another which is expected to be better performing. This is often applied repeatedly. So, all given options are true in this question.
Detailed explanation-2: -Which of the following comment about peep-hole optimization is true? (D) It is applied in symbol table to optimize the memory requirements.
Detailed explanation-3: -The main objective of peephole optimization is: To improve performance. To reduce memory footprint.
Detailed explanation-4: -Peephole optimization is a type of code Optimization performed on a small part of the code. It is performed on a very small set of instructions in a segment of code. The small set of instructions or small part of code on which peephole optimization is performed is known as peephole or window.