usec timings
From: Bob Silverman (pubkeybreaker_at_aol.comstuff)
Date: 11/18/03
- Next message: osmium: "Re: Neural net - guessing literature kind"
- Previous message: Borys Musielak: "Re: Neural net - guessing literature kind"
- Next in thread: Joe \: "Re: usec timings"
- Reply: Joe \: "Re: usec timings"
- Reply: Richard Heathfield: "Re: usec timings"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 18 Nov 2003 22:43:35 GMT
Is there anything available under WINDOZE to do CPU timings at the
microsecond scale? Microsoft's libraries have a system clock call, but it
is only millsecond level timing.
Also, I am doing some loop timing studies on some CPU-intensive code.
What is strange is that the number of clock ticks being returned seems
ALWAYS to be near a multiple of 16. The code goes:
start = clock()
. loop
end = clock()
printf(....end - start)
It prints values like 0, 15, 16, 32, 63, etc. but never values
in-between.
Sometimes the same loop will be timed at 0 many times, then mysteriously
show up as 15 ticks. But it NEVER times at (say) 7 or 8 ticks. The ticks
are supposed to be 1/1000 sec.
This is being run on a system where no other user programs are running.
I could see a loop showing up as 0 as most of the time, then maybe some
small values other times (if, say, a system process kicked in behind the
scenes) but when you see 0,0,0,0,0,0,15,0,0,0,0,16,0,0,0,.... it makes one
wonder.
Comments? Ideas?
"You can lead a horse's ass to knowledge, but you can't make him think."
- Next message: osmium: "Re: Neural net - guessing literature kind"
- Previous message: Borys Musielak: "Re: Neural net - guessing literature kind"
- Next in thread: Joe \: "Re: usec timings"
- Reply: Joe \: "Re: usec timings"
- Reply: Richard Heathfield: "Re: usec timings"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|