Running Mac Squeak on Darwin?

John M McIntosh johnmci at smalltalkconsulting.com
Fri May 23 05:31:04 UTC 2003


On Thursday, May 22, 2003, at 08:51  AM, Aaron J Reichow wrote:

> I know John pulls some tricks to improve speed with the Mac VM.  Does  
> he
> use GCC when compiling for OS X, or is he still using CodeWarrior or  
> MPW?
> If he isn't using GCC, it may not be very doable without taking out all
> of these tricks. :)
>
> Regards,
> Aaron

The Mac VM is build with Apple's Project Builder which is a front for  
the GCC tools and replaces
the make environment.

The *trick* is really to do with how the GCC compiler builds the  
powerpc instructions, by
using a global structure to replace individual globals in the interp.c   
and with the usage of register variable overloading
(IE register foo is a pointer to the structure foo) we produce code  
that has on average 1 less (or more) instruction per global register  
reference. This gained *significant* performance improvements when it  
was implemented a year or so ago.

Same type of improvement occurs (if I recall) for ARM.
For the commonly used register POOR cpus there is no benefit.

Interestingly enough this is not an issue with CFM based object code  
because how globals are referenced
off of R2. However gcc has much better optimization than CW and besides  
debugging CFM is impossible with the free tools.

Currently (I think) all these tricks are bundled into VMMaker and  
auto-magically done when you build a macintosh VM, or
other architecture where the VM maintainer has indicated usage of a  
global structure will make things faster.

--
======================================================================== 
===
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
======================================================================== 
===



More information about the Squeak-dev mailing list