Message board for the users of flat assembler.
> Examples and Tutorials > Accurate multi-threaded 64-bit counters on a 32-bit machine
Goto page Previous 1, 2, 3
and one should stay content with the timing of the oldsafe proc, once
considering the recomended Intel's solution. from Example 8-4.
on my Yorkfield it times at least 3x slower !!
some little improvement, by using PAUSE to signal entering the wait-loop for the new safe proc, but only unstable 10%. it may work better on older processors though.
|04 May 2013, 19:29||
while checking for updates on azillionmonkeys today, i have had an idea reading the code there.
it may achieve 2 benefits:
1) save some power while spinning
2) smooth aggressivity of the thread, allowing other threads to hit successfully
mov esi,ADDER_VALUE and 0xffffffff mov edi,ADDER_VALUE shr 32 .loop pause times 4 nop mov eax, dword counter ;