title: What's the fastest method to return the position of the least significant bit set in an integer in Python 3?
body: <p>I'm curious to find what the fastest algorithm is for returning the position of the least significant bit set in an integer in Python 3.</p>
  
  <p>Are there algorithms faster than this one in Python 3?  Any enhancements one could use to speed things up?</p>
  
  <pre><code>def lsb(n):
      temp = n &amp; -n
      pos = -1
      while temp:
          temp &gt;&gt;= 1
          pos += 1
      return(pos)
  </code></pre>