Ad
  • Custom User Avatar

    Dubious because:

    • it is not clear that recursion is that much inefficient when using a logarithmic algorithm like here, moreover the resulting code is much lighter and much more readable;
    • You seem to forget that your code is compiled and the compiler knows very well how to optimize this kind of trivial operations, so it is more than reasonable to assume it will choose the most efficient method, no matter if you use bitwise or classical division initially.