fetchClassOf & commonSend?

Tim Rowledge tim at sumeru.stanford.edu
Sat Dec 15 04:50:17 UTC 2001


Scott A Crosby wrote:

> Here's what I did, the machinery was already in sqXWindow.c (and is
> activated with #define ITIMER)
> 
>         int ioLowResMSecs(void)
>         {
>         #ifdef USE_ITIMER
>           return lowResMSecs;
>         #else
>           return ioMSecs();
>         #endif
>         }
> 
> Plus some machinery in to set the alarm handler up in:
>         void SetUpTimers(void);
Which may be fine and dandy for unix, but may be total crap for other
machines. The large variations in performance of assorted timers on
assorted machines is why we ended up with lowResMSecs, ioMSecs etc in
the first place.
> 
> I got a few percent speedup as part of this, and I didn't have to have any
> 'this primitive might be slow, this primitive is fast' nonsense. I say to
> reuse this idiom for the other platforms? Assume that the OS can give us a
> wake-up call every 10ms, which we use to decrement a counter?
You can't assume any such thing across platforms. Oh, and the 'nonsense'
is one of the tricks used to very good effect to make VW ten to twenty
times faster than Squeak.






More information about the Squeak-dev mailing list