01.About Programming /8.Assembly Lab
nop vs pause
JamesK78
2010. 1. 5. 13:37
NOP instruction can be between 0.4-0.5 clocks and PAUSE instruction can consume 38-40 clocks.
Please refer to the whitepaper on how to measure the latency and throughput of various instructions.
The REPE instruction comes in various flavors and the latency/throughput of each of them varies. Please also see below for the sample code to measure the average clocks.
for (int i=0; i
{
REPEAT_1000(__asm { nop};)
}
for (int i=0; i
{
REPEAT_1000(__asm { pause};)
}
Please refer to the whitepaper on how to measure the latency and throughput of various instructions.
The REPE instruction comes in various flavors and the latency/throughput of each of them varies. Please also see below for the sample code to measure the average clocks.
for (int i=0; i
{
REPEAT_1000(__asm { nop};)
}
for (int i=0; i
{
REPEAT_1000(__asm { pause};)
}