Does B4X (or the underlying Java) replace division by factors of two with a logical shift. That is ...
... produce the same outcome, but the second one is quicker to code. Do they both execute equally quickly? I am working on an app with a lot of bit shifting and I just wondered whether, when the B4X finishes up in its Java form, division and multiplication by powers of two is replaced by a bit shift anyway.
B4X:
Dim n as Int
n = Bit.ShiftRight(n, 8)
or :
n = n / 256