LOOPRUN

// This program does not uses loop unrolling.
#include<stdio.h>
int main(void)
{
for (int i=0; i<5; i++)
printf("Hello\n"); //print hello 5 times
return 0;
}
// This program uses loop unrolling.
#include<stdio.h>
int main(void)
{
// unrolled the for loop in program 1
printf("Hello\n");
printf("Hello\n");
printf("Hello\n");
printf("Hello\n");
printf("Hello\n");
return 0;

Comments