Re: Cycles per Tool function?
- From: Martin Doherty <martin.doherty@xxxxxxxxxxxxxxx>
- Date: Tue, 11 Oct 2005 13:30:04 -0400
Jeff Blakeney wrote:
You don't need to do that. You could just write a toolbox "exerciser" program that would allow you to enter parameters for the toolbox call and time how long it takes to run the routine. If the routine is too fast for the timer resolution, you could always run the toolbox routine 100 or 1000 times and then divide the total time by the number of calls you made. This will at least give you a rough idea how long a given routine would take to run.
That "run X times" approach is a great black box performance measurement technique. I would just suggest that you should also run the timing loop 1000 times with a null toolbox call, so you can subtract the overhead of the measurement code from the result before dividing by X.
By choosing large values for X, you can get very precise timing results in fractions of a second, but not in cycle counts.
begin
/* Null timing loop */
t1 = clock;
for i = 1 to X do
null;
t2 = clock;
nulltime = t2 - t1; /* Real timing loop */
t1 = clock;
for i = 1 to X do
toolbox_call (param1, param2);
t2 = clock;
totaltime = t2 - t1;singlecalltime = (totaltime - nulltime) / X; end; .
- Follow-Ups:
- Re: Cycles per Tool function?
- From: josephoswaldgg@xxxxxxxxxxx
- Re: Cycles per Tool function?
- From: josephoswaldgg@xxxxxxxxxxx
- Re: Cycles per Tool function?
- References:
- Cycles per Tool function?
- From: Dave
- Re: Cycles per Tool function?
- From: Jeff Blakeney
- Cycles per Tool function?
- Prev by Date: Re: Cycles per Tool function?
- Next by Date: Re: Cycles per Tool function?
- Previous by thread: Re: Cycles per Tool function?
- Next by thread: Re: Cycles per Tool function?
- Index(es):
Relevant Pages
|