Skip to content

Instantly share code, notes, and snippets.

@mikeb01
Created August 30, 2012 09:18
Show Gist options
  • Save mikeb01/3524702 to your computer and use it in GitHub Desktop.
Save mikeb01/3524702 to your computer and use it in GitHub Desktop.
POPCNT Demo
public class PopCntTest
{
public static void main(String[] args)
{
int result = 0;
for (int i = 0; i < 1000000000; i++)
{
result += Integer.bitCount(i);
}
if (result == 0)
{
throw new RuntimeException();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment