Re: Java Memory Model and ParallelStream

Andrew Haley via Concurrency-interest <[email protected]>
Newsgroups gmane.comp.java.jsr.166-concurrency
Message-ID <[email protected]>
On 3/6/20 11:11 AM, Luke Hutchison via Concurrency-interest wrote:
> I realize
> that inlining doesn't just happen at compiletime, and the JIT could decide
> at any point to inline a function, but I want to ignore that (very real)
> possibility to understand whether reordering can take place across method
> boundaries _if inlining never happens_. Brian Goetz commented that "JIT
> regularly makes optimizations that have the effect of reordering operations
> across method boundaries" -- so I think the answer is yes. I just don't
> understand how that would happen.

The CPU *hardware* does this all the time. Few processors have a
total store order: x86, which does, is the exception here.

-- 
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

_______________________________________________
Concurrency-interest mailing list
[email protected]
http://cs.oswego.edu/mailman/listinfo/concurrency-interest
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.