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