Re: Cycles per Tool function?



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;
.



Relevant Pages

  • Re: OWC11 Not coming For webpage....
    ... Your parse routine should be something like this ... chart from microsoft office xp web components. ... in toolbox i do right click and i choose "choose items" from com ...
    (microsoft.public.office.developer.web.components)
  • Re: Idea: Multitasking graphical OS for the GS
    ... My thinking over the years has been to start with the toolbox. ... an event loop like so: ... tell the operating system when each function in your ... when the routine finishes. ...
    (comp.sys.apple2)
  • Re: ComboBox and UserForm_Initialize
    ... I used the View>Toolbars>Control Toolbox. ... After adding the ComboBox I right ... UserForm_Initialize routine but it seems not to execute. ...
    (microsoft.public.word.docmanagement)
  • Re: Baby tired signs
    ... What kind of a routine are you in? ... awake before you're putting him down again? ... I'm certainly not going by the clock, and I haven't yet tried to ... gas but about a week or two ago realized it was exhaustion. ...
    (misc.kids)
  • Re: hpcalc ROM 83 OK
    ... I have found that this routine does not prove anything. ... The new ROM does something ... With ROM buid 80 and 83 CLKADJ is not working properly, ... The most accurate clock I have, for the time beeing, is an HP 49G. ...
    (comp.sys.hp48)