Ramblings on how to optimize Squeak for modern CPU bit manipulation (Was Re: I was wondering ...

Lawson English english at primenet.com
Wed Jun 23 00:34:50 UTC 1999


Bruce O'Neel <beoneel at mindspring.com> said:

>>front-end to the GNU Objective-C compiler... Best of both worlds:
>>interactive testing of algorithms within Squeak and then direct-compile
>via
>>the Obj-C compiler. Give Java a run for its money...
>
>Hmm, I already find Squeak to be faster than java on my choice of 
>platforms (Mac).  Yes, I'm sure if you pick the right combo of tests 
>maybe java is faster but Squeak is quite fast for me.  It's even more 
>impressive when you keep in mind how much of it is Squeak and how little 
>is compiled c...

I'm hitting the performance wall right now, simply examining how to extend
BitBlt to handle GX-like color. There appears to be too many levels of
indirection inherent in the current implementation of BitBlt do what I'd
like efficiently.

Alternatively, a set of more powerful bit-manipulation primitives for
Smalltalk might work almost as well, and would be far easier to implement.

The current Smalltalk bit-manipulation primitives are, well, primitive
compared to what is available in today's processors, especially when you
look at what MMX and AltiVec and other SIMD instruction set architectures
can do.

It should be possible to create a set of bit-manipulation primitives that
can be mapped directly to modern processors or to efficient C simulations
of the same. 

What should a generic set of higher-level bit-handlers be able to do and
how high-level should we go? Should multi-word manipulation be supported,
for instance? PowerPC's AltiVec handles 32 128-bit registers and can
manipulate them as 4 32-bit, 8 16-bit, or 16 8-bit registers in parallel,
either as fixed or float representations. Is it worth attempting to provide
direct Smalltalk access to these capabilities? Should we go with LCD
manipulation and specify that only 32-bit registers would be supported, or
should we aim towards the highest-level and require other Squeak
implementations on other CPU families to implement the capabilities in C?

Comments?

----------------------------------------------------------------------
Use your imagination.
----------------------------------------------------------------------





More information about the Squeak-dev mailing list