Loop Optimization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
I was wondering if gcc can optimize this type of for loop using loop
rollback technique,
for(int i=5;i--;){//body}
in general we use,
for(int i=0;i<5;i++){//body} , this type of loops are easy to
understand for compilers and as 5 is constant compiler can apply loop
rollback technique to optimize.
I wonder which type of for loop will be good to use.
i will be grateful if someone responds.
Thanking you,
Debajyoti Chatterjee



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux