Java memory model question
Andrew Haley
aph at redhat.com
Fri Mar 6 13:52:21 UTC 2020
On 3/6/20 10:27 AM, Luke Hutchison wrote:
> On Fri, Mar 6, 2020 at 12:46 AM Brian Goetz <brian.goetz at oracle.com> wrote:
>
>> No, but this is a common myth. Method boundaries are not part of the
>> JMM, and the JIT regularly makes optimizations that have the effect of
>> reordering operations across method boundaries.
>
> Thanks. That's pretty interesting, but I can't think of an optimization
> that would have that effect. Can you give an example?
Inside an optimizer in intermediate form, unrelated operations are
often unordered: that is to say, they may be emitted in any order.
--
Andrew Haley (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the jdk-dev
mailing list