Discussion
A loop body of 8 instructions is unrolled by a factor of 4. Ignoring the prologue, how many instructions does one unrolled iteration contain, excluding the loop control?
Answer: A
Correct answer: 32
\[ 8 \times 4 = 32\ \mathrm{instructions}. \] The point of the unroll is that one copy of the loop control now serves four bodies instead of one, so the per-iteration overhead falls to a quarter and the four bodies can be scheduled together. The cost is code size, which is the conflict with optimising for size.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development