How to demonstrate Java instruction reordering problems?
This demonstrates reordering of certain assignments, out of 1M iterations there is usually couple of printed lines. public class App { public static void main(String[] args) { for (int i = 0; i < 1000_000; i++) { final State state = new State(); // a = 0, b = 0, c = 0 // Write … Read more