You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Starting with the Intel Pentium processor, most Intel CPUs support out-of-order execution of the code. The purpose is to optimize the penalties due to the different instruction latencies. Unfortunately this feature does not guarantee that the temporal sequence of the single compiled C instructions will respect the sequence of the instruction themselves as written in the source C file. When we call the RDTSC instruction, we pretend that that instruction will be executed exactly at the beginning and at the end of code being measured (i.e., we don’t want to measure compiled code executed outside of the RDTSC calls or executed in between the calls themselves).
The text was updated successfully, but these errors were encountered:
It is kind of a lazy preference to not serialize with cpuid. If I'm calling it extremely frequently, I'm willing to live with some jitter instead of taking the overhead from cpuid, and if I'm not calling it frequently (e.g. measuring many repetitions at once), it's not going to make much of a difference.
In this case neither matter since I forgot to update t inside the testing loop, so it's basically only taking the first timing regardless.
This code looks wrong:
Snippet from this paper http://download.intel.com/embedded/software/IA/324264.pdf :
The text was updated successfully, but these errors were encountered: