If I want to do the fastest way to calculate x * 2, which one should I use?
x << 1
or
x * 2
With the same logical thinking, if I want to do the fastest way to calculate x / 2, which one should I use?
x >> 1
or
x / 2
Why?
1
If I want to do the fastest way to calculate x * 2, which one should I use?
x << 1
or
x * 2
With the same logical thinking, if I want to do the fastest way to calculate x / 2, which one should I use?
x >> 1
or
x / 2
Why?
1