Integer division by constants is routinely optimized to bit shifts (if by powers of two), multiplication by the "integral reciprocal" and all kind of tricks, so performance should not be a concern.
What matters is to clearly express intent. If you are operating on integers "as numbers" and you divide by something that just happens to be a power of 2 use the division operator.
int mean(int a, int b) {
return (a+b)/2; // yes overflow blah blah
}
If instead you are operating on integers as bitfields - for example, you are unpacking a nibble and you need to right shift by 4 to move it in "low" position, or you need to explicitly set some bit -, then use bitwise operators.
void hex_byte(unsigned char byte, char *out) {
out[0]=byte>>4;
out[1]=byte&0xf;
}
unsigned set_bit(unsigned in, unsigned n) {
return in | (1<<n);
}
In general, most often you'll use division on signed integers, bitwise operators on unsigned ones.