Color buried treasure

Andres Valloud sqrmax at
Fri Feb 26 02:16:59 UTC 1999


I've found a #>> send in Color in a private method... it's about 4 times slower
than #bitShift:, so I first thought about replacing #>> with #bitShift:, and
then I just thought about using //... so...

Taking advantage of so much VM talk, would it be troublesome to support fast
smallinteger shifting, like making #bitShift: hardwired as $+ and so? It's 1 or
2 cpu cycles versus 39 (intel 32 bit division and multiplication take at least
that, division is slower, perhaps with fast out determination for

And here's the fileout for the changed method in Color. I noticed 
they were slow
checking them while trying to speed up Heckbert's quantization. Hehe, it works!
Right now it quantizates a 512x384x32 bit image with 630 colors down to 256
colors including building the representatives in 2.469s (200mmx). I still have
to build the renderer to change all colors in the source to those 
quantizated by
Heckbert's algorithm.

Content-Type: application/x-unknown-content-type-st_auto_file;
Content-Disposition: inline;

Attachment converted: (????/----) (000072BF)

More information about the Squeak-dev mailing list