The
111111112 & 1000000002 == 0
8bit 9 bit
The modulus operator
111111112 % 1000000002 == 111111112 == 25510
8 bit 9 bit 8 bit
The question which is faster, does not help to gain performance win, because are giving different results.
&
is a logical bitwise and operation:111111112 & 1000000002 == 0
8bit 9 bit
The modulus operator
%
returns the rest of an division. It's a different behavior as the bitwise and operation.111111112 % 1000000002 == 111111112 == 25510
8 bit 9 bit 8 bit
The question which is faster, does not help to gain performance win, because are giving different results.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!