Without compiler optimization, the first loop goes to assembler as follows:
@@:
cmp ... ; or test ...
jz @f
...
jmp @b
While the second cycle goes on to the following:
jmp bottom
@@:
...
bottom:
cmp ... ; or test ...
jz @b
Conditional branching is usually predicted, so the first method could potentially lead to an increase in pipeline / instruction cache flows.
, , (2N), , jump (N+1).
. . 88 .