frustrations in de-slowifying code.

Alan Grimes alangrimes at starpower.net
Sun Mar 21 02:54:46 UTC 2004


Ned Konz wrote:

>On Saturday 20 March 2004 9:37 am, Alan Grimes wrote:
>Well, none of those methods are meant to be used in tight/fast loops.
>
>If you want to analyze forms repeatedly, then make your own bitPeeker and keep 
>it around.
>  
>
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]].

My system is running at 16 bits which _ I think_  is usually encoded 
IRRR RRGG GGGB BBBB..., the 15 bit coding discards the I bit....

I'm not even sure that the current version does the correct brightness 
computation...

Oh well, I'll look at it tomorrow. Let me know if you know anything 
about this problem...

At the moment I'm more concerned about the workhorse loop which does not 
work with the profiler even when I reduce the snoop interval from 16 to 
10...

Strangely, even though it does about a dozen times as much work, it's 
already almost as fast as the input loop described above.



More information about the Squeak-dev mailing list