title: Which algorithm is faster for checking if a bit is set?
body: <p>I am making a game in which I am storing a lot of data in one integer or long, because I will have a massive amount of data.  I don't want to use whole classes for performance reasons, and they are not needed.  I found two methods to retrieve one bit from an integer.  I was wondering if anyone knows which one I should use or which one is faster.</p>
  
  <p>The methods:</p>
  
  <p><code>return (integer &amp; (1 &lt;&lt; bit)) != 0;</code></p>
  
  <p><code>return (integer &gt;&gt; bit&amp; 0x1) == 1;</code></p>