```
public class Solution {
public int rangeBitwiseAnd(int m, int n) {
if (m == n){
return m;
}
//The highest bit of 1 in diff is the highest changed bit.
int diff = m ^ n;
//Index is the index of the highest changed bit. Starting at 1.
int index = (int)(Math.log(diff) / Math.log(2)) + 1;
//Eliminate the changed part.
m = m >> index;
return m << index;
}
}
```

I think this is fast since it doesn't involve loops.