This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Loop Unroll


On 05/05/2011 14:59, VAUGHAN Jay wrote:
On 05/05/2011 02:08 PM, Francis Girard wrote:
How may we _easily_ know whether the compiler did indeed unroll a loop
or not in C/C++ ?

Look at the assembly output and see for yourself.




I don't know if that counts as "easily", but I can't think of any other reliable way.


Perhaps you could time the program and see if it runs faster - if you can't tell the difference in time, then it probably doesn't matter if the loop was unrolled.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]