Re: How to time the execution of a method?
- From: "Nurax" <nurax@xxxxxxxxxxxxxx>
- Date: Wed, 24 Oct 2007 15:06:09 +0200
"Maarten Wiltink"
This solves a different problem. You measure a thousand times,
then average all the individual measurements. If the resolution
of GetTickCount is not sufficient to measure the time taken by
calling x, that won't help. The average of a thousand zeroes is
still zero.
tot/1000 is not the average, but to get seconds from milliseconds.
But you're right: it is better and simpler to call GetTickCount only
twice:
t := GetTickCount;
for i := 1 to 1000 do x;
tot := GetTickCount - t;
This way we're timing the /for/ too, but it's still ok to compare
different methods.
.
- References:
- How to time the execution of a method?
- From: Robert Baker
- Re: How to time the execution of a method?
- From: Nurax
- Re: How to time the execution of a method?
- From: Maarten Wiltink
- How to time the execution of a method?
- Prev by Date: Re: How to time the execution of a method?
- Next by Date: Re: How to time the execution of a method?
- Previous by thread: Re: How to time the execution of a method?
- Next by thread: Re: How to time the execution of a method?
- Index(es):
Relevant Pages
|