Skip to content

Instantly share code, notes, and snippets.

@andrebrait
Created December 28, 2018 22:06
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 andrebrait/97c2094768734f368a7a8ced4557028d to your computer and use it in GitHub Desktop.
Save andrebrait/97c2094768734f368a7a8ced4557028d to your computer and use it in GitHub Desktop.
@Benchmark
public void testMethod(MyState state, Blackhole blackhole) {
int sum1 = state.a + state.b;
int sum2 = state.a + state.a + state.b + state.b;
blackhole.consume(sum1);
blackhole.consume(sum2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment