[tremor] A possible improvement for some of the processor where tables hit hard

Monty xiphmont at xiph.org
Wed Oct 16 02:22:32 PDT 2002



On Sun, Oct 13, 2002 at 04:01:56PM -0400, marc dukette wrote:
> I have replaced the mask table in bitwise.c with the following, and while it
> has little to no effect on an SA processor it does appear to help the
> version we have running on MIPS, so it may be of value to other processors
> as well:
> 
> old:
>   unsigned long m= mask[bits];
> 
> new:
>   unsigned long m= (((unsigned int)-1)>>(32-bits));
> 
> and of course you can now remove the mask table.  I'm just throwing this
> out, not sure if it's worth adding to the standard or not.

Good basic idea, but not equivalent.  In the case where bits==0...

Monty
--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'tremor-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Tremor mailing list