 The runtime (which, in this case, usually refers to the dynamic compiler, the processor and the memory subsystem) is free to introduce any useful execution optimizations as long as the result of the thread in isolation is guaranteed to be exactly the same as it would have been had all the statements been executed in the order the statements occurred in the program (also called program order).The major caveat of this is that "as-if-serial" semantics do not prevent different threads from having different views of the data.The memory model provides clear guidance about what values are allowed to be returned when the data is read.