[quake2] CVS: Mouse still a bit bad

arny at taiga.com arny at taiga.com
Mon Sep 27 05:53:52 EDT 2004


> Obviously the '<<4' is equiv to '*2',

No its equiv to '* 16', i.e. a left shift of the value by 4 places,
each place is equivalent to * 2.

(Unimportant random thought:
TBH I tend to feel if you want to say '* 16' conceptually, you might
as well say '* 16' and let the compiler worry about optimising it
unless its real speed critical and you know its a compiler that
doesn't optimise that much.  Likewise I wouldn't multiply if
conceptually I want a left shift.  Optimisations like that belong
in the compiler, you wouldnt do ptr+=x<<2; when you mean ptr+=x*
sizeof(long);, and its stuff like that that can be speed critical.)



More information about the quake2 mailing list