Performance profiling results...

Scott A Crosby crosby at qwes.math.cmu.edu
Tue Sep 25 06:17:08 UTC 2001


On Sat, 22 Sep 2001, John M McIntosh wrote:

> >Trust me, getting rid of this would eliminate 40,000 system calls A
> >SECOND, and 4% of the runtime.
>
> Scott, You know I looked at this on the macintosh a year back or so.
> I found the timer call backs took longer. However David Simmons

I don't want a time, just a cheap stopwatch that I can check to see if
something took too long. No long-term stable timer.

> pointed out another clock in Quicktime that we might use. One of the
> things you need to watch here, I think, is perhaps not incrementing a
> counter, rather you get the clock. I'm not sure you have a guarantee
> that over N days you would end up with your millisecond clock
> matching the OS clock if you do the increment (mind it does wrap, but

Irrelevant. The code there just wants to know 'if the primitive took too
long'. We don't need a stable timer, So a variable that gets incremented
100 times a sec +/- 10%, which we can see if it incremented 2 times, and
if so, we know that it took a minimum of 10+epsilon  +/- 10%
milliseconds. Which is good enough.

Scott






More information about the Squeak-dev mailing list