E N D
Student Name:Nargis Sehar Teacher Name :Mam Noor-Ul Aain Subject :Computer Architecture College :ITM Group of Colleges
What is Loop Unrolling? ● Loop unrolling is also known as loop and winding is a relatively simple but very powerful and effective technique to reduce loop ,loop overhead. ● It replicates the body of the loop multiple times the number of replications is sometimes is called the loop unrolling factor in order to do so the loop termination code as well as some address calculation however need To be adjusted
Before loop unrolling Int i=1; While (i<=100) a{i}=b{i}; I++; }
After Loop Unrolling Int i=1 While (i<=100) { a[i]=b[i]; I++; a[i]=b[i]; I++; }
How much faster is loop unrolling? Unrolling WHILE loops In this case, unrolling is faster because the ENDWHILE (a jump to the start of the loop) will be executed 66% less often. Even better, the "tweaked" pseudocode example, that may be performed automatically by some optimizing compilers, eliminating unconditional jumps altogether.
What is the significance of loop unrolling? Loop unrolling is a loop transformation technique that helps to optimize the execution time of a program. We basically remove or reduce iterations. Loop unrolling increases the program's speed by eliminating loop control instruction and loop test instructions