Re: CPU speed without rdtsc
- From: "rhyde@xxxxxxxxxx" <spamtrap@xxxxxxxxxx>
- Date: 12 Nov 2006 21:18:03 -0800
Wojtek wrote:
Hi there!
I'm new here, so sorry if the question has appeared once :-)
I have to chceck speed of my CPU without using rdtsc. I wrote such code:
int _tmain(int argc, _TCHAR* argv[])
{
long long ile_operacji = 1000000000;
SYSTEMTIME st;
SYSTEMTIME st2;
GetSystemTime(&st);
You seem to be writing a Win32 app here, no?
If so, there is a kernel call you can make to get this information (off
the top of my head, I don't remember the API name, but I'm sure someone
else will follow up with that information).
RDTSC is becoming less and less reliable anyway. On multi-core CPUs,
different calls can return a different RDTSC counter value (if the
thread has switched affinity), so be aware of that.
Cheers,
Randy Hyde
.
- Follow-Ups:
- Re: CPU speed without rdtsc
- From: Tim Roberts
- Re: CPU speed without rdtsc
- References:
- CPU speed without rdtsc
- From: Wojtek
- CPU speed without rdtsc
- Prev by Date: Re: Help: ASM to ASM calls
- Next by Date: Get the FAQs
- Previous by thread: CPU speed without rdtsc
- Next by thread: Re: CPU speed without rdtsc
- Index(es):
Relevant Pages
|
|