[color=Blue]Technically speaking these for loops will NOT do the same work, because index has different values (i will never be EQUAL to num in loop #1, but in loop $2 it WILL). The performance in FOR() part should be the same.[/color]
As per the dis-assembly in the 1st for loop, an additional instruction is required to set the flag if index has reached the 'num' value. Where as in the 2nd for loop, the index can be directly checked if it's greater than zero.
Comments