the existing one more "readable" to me, know what i mean? just looking at 8* i guess y means the zero-based y-th byte you want to get from x (which is a word/dword/qword?)
but <<3 makes it harder to follow? On 8/6/05, Arash Partow <[EMAIL PROTECTED]> wrote: > 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 > > -- "Thou shalt not follow the null pointer for at it's end madness and chaos lie."
