PDA

View Full Version : OT: Timing (RDTSC etc)



marcus256
10-20-2003, 03:13 AM
I was surprised to find that QueryPerformanceCounter uses RDTSC on my P4 2.8 (SMT) / XP machine.

I searched the web and somewhere I read that the multiprocessor HAL of NT uses RDTSC for QueryPerformanceCounter, while the Uniprocessor HAL does not.

To me this sounds very backward, since I thought that in an SMP system the multiple CPU cores may not be in cycle-exact sync. Anyhow, this leads me to believe that the cores ARE in sync, so that (finally a conclusion) RDTSC can safely be used on both SMP and SMT systems.

Can someone please verify this?

MichaelK
10-20-2003, 06:14 AM
Hi.

Yes, You are right. This is OT.

Pozdrawiam,
Michal Krol

marcus256
10-20-2003, 10:23 AM
To justify: this is for the timer of GLFW (my OpenGL framework)... http://www.opengl.org/discussion_boards/ubb/wink.gif

I should probably move this question to GameDev or so. Appologies to those who are/were offended by this thread...