A question about performance:
int x = 0;
...
...
x = 123456 * z; // z is not zero, is dynamic
int y = x / 2;
Everywhere I read this is a shift operation, but this to me seem like the compiler has to take into account the sign, so it must do a complete division which takes much cycles than a >>
this to me seem more in that sense
unsigned int x = 0
x
...
...
x = 123456 * z // z is not zero, is dynamic
int y = x / 2; // the compiler here will use >>
am I correct?