Loop unrolling is a code optimization technique:
2015
Loop unrolling is a code optimization technique:
- A.
that avoids tests at every iteration of the loop
- B.
that improves performance by decreasing the number of instructions in a basic block
- C.
that exchanges inner loops with outer loops
- D.
that reorders operations to allow multiple computations to happen in parallel
Attempted by 62 students.
Show answer & explanation
Correct answer: A
Loop unrolling is a compiler optimization technique that reduces loop overhead. It works by executing multiple iterations within a single loop cycle, which minimizes the frequency of branch instructions and termination tests. This transformation improves performance by avoiding unnecessary checks at every iteration.
A video solution is available for this question — log in and enroll to watch it.