Hi all,

I was wondering if the getbyte macro found in misc.h is as
optimal as it can be...

I propose using a shift-left by 3 instead of an integer
multiply by 8.


original macro:
GETBYTE(x, y) (unsigned int)byte((x)>>(8*(y)))

updated macro:
GETBYTE(x, y) (unsigned int)byte((x)>>(y<<3))


Is there anything wrong with this idea?




Arash Partow
__________________________________________________
Be one who knows what they don't know,
Instead of being one who knows not what they don't know,
Thinking they know everything about all things.
http://www.partow.net

Reply via email to