I don't really see why:<p><pre><code> public class TestJIT {
public static void main(String[] args) {
for (int i = 0; i < 20_000; i++) {
payload();
}
}
public static int payload(int a, int b) {
return a + b;
}
}
</code></pre>
shouldn't be optimized into a 'no-op'. The end-effect is the same.