Ad
  • Default User Avatar

    How so? Integer multiplication and division by two are internally realized using bit shifts:

    x * 2 == x << 1
    x // 2 == x >> 1
    

    Which of these is better? (In my own experiments, I found only a negligible speed difference < 1%)