Which optimizations does Hotspot apply?

Andrej Golovnin golovnin at gmx.net
Mon Jan 27 22:04:51 UTC 2014


Hi Rémi, Vitaly,

Thank you for your explanation and for the tips!

> if you see a lot of instances of ArrayList iterator it means that you have a code path that create an iterator and use it later and the JIT is not able to see the creation and the use in the same inlining horizon. As Vitaly said, it's perhaps because you have the same code called with several different kinds of List (teach your programmer to stop to use LinkedList :) or because the code create an Iterator too far from where you use it (by example if the iterator is stored in a List or a Map).

I fight the LinkedList all the time. :-)

Cheers,
Andrej


More information about the core-libs-dev mailing list