[concurrency-interest] HotSpot inlining in hot loops.
dawid.weiss at gmail.com
Tue Jan 12 16:22:50 EST 2010
We had some off-list communications about it too. Thanks for the
thread pointer, it is definitely on topic. It's funny how many
different angles this discussion has; an example of an unsynchronized
busy loop on an object variable _is_ optimized into a jump to the same
location (the condition is evaluated once), so HotSpot is not
consistent here. In any case, my strong belief is that the fact that
the JVM doesn't enforce final fields' assignments doesn't make it any
less suitable for optimization in the case of reader threads; in my
understanding of the JVM spec, such optimizations are allowed and
could take place.
Thanks for discussion, everyone. At least I have some understanding of
the current state of things now.
On Tue, Jan 12, 2010 at 10:04 PM, Ismael Juma <mlists at juma.me.uk> wrote:
> Hi Dawid,
> On Tue, Jan 12, 2010 at 7:47 PM, Dawid Weiss <dawid.weiss at gmail.com> wrote:
>> To complete the thread and for archival reasons -- I did cross-post
>> the question to hotspot-compiler. It seems like the optimisation is
>> reasonable and possible under Java memory model, but hotspot currently
>> does not perform it.
> I saw your thread (through Gmane), but I didn't see any reply from
> HotSpot developers. Coincidentally, there is a related thread that was
> started recently. In case you didn't see it:
> Hope that helps,
More information about the Concurrency-interest