2 ms·
The cycle time of all the instructions involved is specified in the architecture reference manual. The issue here is that the Intel decoder will fuse "dec %[cou
by pjc50 8y ago
The cycle time of all the instructions involved is specified in the architecture reference manual. The issue here is that the Intel decoder will fuse "dec %[counter]; jnz cyclemeasure2" into a single instruction. So the Intel loop is doing one cycle per count and the ARM one is two cycles per count.
- alain94040 8y agoThat's not true for any high-end processor from the last 15 years or so. You just can't predict how instructions will interleave and how much parallelism the processor decoder will be able to extract at run-time.
- pjc50 8y agoIn general no, but if you're only using two instructions, subtract and branch, it's feasible. There's only one register involved, so each subtract is always waiting on the previous one and they cannot run in parallel.