title: Index of single bit in long integer (in C)
body: <p>I am trying to find an optimal code to locate a single bit index in a long integer (64 bit). The long integer has exactly one set bit. (Using C language)</p>
  
  <p>Currently, I am just shifting the whole thing by one bit, then checking for zero. I have read about lookup tables, but it won't do for the whole 64 bits. I thought about checking each 8 bits for zero, if not use a lookup, but still I'll have to shift by 8 at a time. (Shifting by 8 is better than shifting by one 8 times?)</p>
  
  <p>(Note: I am developing for mobile devices, and they are [not surprisingly] slow).</p>