2 ms·
The last time I benchmarked it, which was at the beginning of the i7 era, LOOP was just as fast (within the margin of error) as dec/jnz - Intel probably doesn't
by userbinator 6y ago
The last time I benchmarked it, which was at the beginning of the i7 era, LOOP was just as fast (within the margin of error) as dec/jnz - Intel probably doesn't want to be seen as slower than AMD and didn't care about that timing loop anymore.
- MauranKilom 6y agoCouldn't they just microcode it to that?
- caf 6y agoThat's not how microcode works, but yes - the instruction decoders and retirement logic are capable enough these days that you can have it decode into the same sequence of μops, which is almost certainly what happens. Note that it's not exactly the same thing, because an interrupt can happen between the decrement and jump for the two-instruction case, but not for the LOOP case.