[ENH][VM] making FreeCell redraw 20% faster...

John M McIntosh johnmci at mac.com
Tue Jul 8 00:24:12 UTC 2003


> When you run the FreeCell demo it seems on the powerpc that
> BitBltSimulation>>alphaSourceBlendBits16
> chews a lot of cycles, say 8.7% of the total time.
>
> Well I noticed that in
> BitBltSimulation>> dither32To16: threshold:
> that  it does something interesting, why it grabs the r g b bytes and   
> mangles them into a 16 bit word. But really at each step we have 8  
> bits of data with 4 bits for threshold information to result in 4 bits  
> of output.
>
> {Yes, well it's late maybe my math is wrong}
>
> Gee can you say a lookup table (4096 elements of 4 bits (however 8  
> will do)),

Attached is the changeset  which creates the 4096 byte table and uses  
it to greatly improve performance.

Someone needs to check the interpreter simulator, I couldn't make it  
work out of the box. So I'm not
sure if this changeset works for it.
--
======================================================================== 
===
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
======================================================================== 
=== 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FasterAlphaBlend-JMM.3.cs.gz
Type: application/x-gzip
Size: 2853 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030707/a876525f/FasterAlphaBlend-JMM.3.cs.bin


More information about the Squeak-dev mailing list