Hi.
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 multiplication).
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.
Andres. Content-Type: application/x-unknown-content-type-st_auto_file; name="Color-privateGreen.st" Content-Disposition: inline; filename="Color-privateGreen.st"
Attachment converted: Anon:Color-privateGreen.st (????/----) (000072BF)
squeak-dev@lists.squeakfoundation.org