Skip to content

Instantly share code, notes, and snippets.

@richardstartin
Last active December 20, 2017 16:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richardstartin/26a402bb47e56bea18b0f32c2f52b100 to your computer and use it in GitHub Desktop.
Save richardstartin/26a402bb47e56bea18b0f32c2f52b100 to your computer and use it in GitHub Desktop.
import java.util.concurrent.ThreadLocalRandom;
public class BLSI {
public static void main(String[] args) {
long blackhole = -1L;
while (blackhole != 0L) {
blackhole = blsi(ThreadLocalRandom.current().nextLong());
}
System.out.println(blackhole);
}
public static long blsi(long value) {
return value & -value;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment