[squeak-dev] Time primitivesjkr

David T. Lewis lewis at mail.msen.com
Wed Apr 8 02:08:05 UTC 2015


On Tue, Apr 07, 2015 at 06:30:36PM -0700, tim Rowledge wrote:
> 
> On 07-04-2015, at 6:21 PM, Eliot Miranda <eliot.miranda at gmail.com> wrote:
> >    named primitives have overhead that numbered ones don't.  
> 
> I *thought* I?d fixed that back around ?04 by caching the actual address ? Always possible I didn?t get it right, of course. I do seem to remember some pretty good performance improvements as a result of the changes.
> 

Tim,

As far as I can tell, your fixes work fine and there is essentially no performance
difference between named and numbered primitives once the function address has
been loaded. So for a frequently used primitive, there is no difference at all.

I am using UTCDateAndTime in my working images, so #primitiveUtcWithOffset
is used heavily as a named primitive. Overall this much faster (and better
in various other ways) than the standard Squeak Chronology implemention.
I have not actually tried running it with a numbered primitive, but I see
no reason to think that we would get additional performance out of adding
#primitiveUtcWithOffset to the primitive table.

My working assumption is that numbered primitives should be defined only for
the absolutely essential primitives needed to bootstrap on a new platform,
and that everything else should be a named primitive.

Dave



More information about the Squeak-dev mailing list