Intermediate
Computer Architecture & Organization
Q73 / 100
What is "loop unrolling" as a compiler optimization technique, and how does it relate to CPU architecture?
Correct! Well done.
Incorrect.
The correct answer is A) It replicates the body of a loop multiple times to reduce the overhead of loop control instructions and can expose more instruction-level parallelism for the CPU to exploit
A
Correct Answer
It replicates the body of a loop multiple times to reduce the overhead of loop control instructions and can expose more instruction-level parallelism for the CPU to exploit
Explanation
By duplicating loop bodies, fewer branch/jump instructions are needed relative to the work done, and the resulting independent operations can be better scheduled and pipelined by the CPU, though at the cost of larger code size.
Progress
73/100