Hi,

Is there a more efficient way to calculate the log base 2 of a 64-bit unsigned integer than looping through the bits? I couldn't find an algorithm on the internet that works on 64-bit numbers.

PS. assume that the input is a power of 2 (exactly one bit is set)

Thank you very much