frustrations in de-slowifying code.

Yoshiki Ohshima Yoshiki.Ohshima at acm.org
Thu Mar 25 00:46:06 UTC 2004


  Hello,

> This is the key operation (this is just part of the input loop of the 
> program):
> 
>      do: [:j |  brightnessArray at: offset + j put: (theForm colorAt: j 
> @ i) brightness]].

  I might have missed some suggestions from other guys, but if it is
ok to have the brightnessArray be another form, you can set up a
colorMap that maps a 16-bit color to its brightness value (scaled to
an integer) and do a "Form over" bitblt operation with the colorMap.
It can be probably a lot faster.

-- Yoshiki



More information about the Squeak-dev mailing list