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.