On Thu, Aug 08, 2002 at 05:15:56PM +0200, Olivier Chapuis wrote:
> On Thu, Aug 08, 2002 at 03:18:06PM +0100, Tim Phipps wrote:
> > OK->find . -name '*.h' -o -name '*.c' | xargs grep -n 257
> > [snip]
> > 
> > I can't help feeling that 257 is the wrong number for all this stuff and 
> > 256 is the correct number. It might be better to just leave most of 
> > these things as unsigned shorts or pass XColor's around and convert to 
> > byte size pieces as late as possible.
> > 
> 
> 257 is magic in the sense that 255*257 = 65535. I will make the change.
> 
> > /257 will take ages on any processor, /256 will take one cycle on most.
> 
> Is ">> 8" may be faster?

As it requires only a shift operation instead of a division it's
definitely faster.

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, mail: [EMAIL PROTECTED], phone: 0721/91374-382
Schlund + Partner AG, Erbprinzenstr. 4-12, D-76133 Karlsruhe
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to