Is there a trick for creating a faster integer modulus than the standard % operator for particular bases?
For my program, I\'d be looking for around 1000-4000 (e.g.
You could zero out the high order bits i.e.
x = 11 = 1011 x % 4 = 3 = 0011
so for x % 4 you could just take the last 2 bits - I'm not sure what would happen if negative numbers were used though