Java 9 performance optimizations

Vitaly Davidovich vitalyd at
Tue Nov 3 12:09:04 UTC 2015

Yes, I had seen Chris' presentation as well.  Certainly modularization will
help AOT in many ways.  But, I'm particularly interested on the JIT side.
What was meant by aggressive lambda inlining, for example? Can anyone point
at some additional info?


sent from my phone
On Nov 3, 2015 6:37 AM, "Jeroen Borgers" <jborgers at> wrote:

> I found this interesting presentation "Java goes AOT" from JVM Language
> Summit:
> As presented by Christiaan Thalinger from HS compiler team, AOT is used
> with Graal to reduce startup time and quicker peak performance (tiered).
> Currently they don't do any inlining in AOT yet because compilation time
> blows up by inlining everything since no profiling information is available
> yet. I guess modules and knowing dependencies can help here to reduce this.
> Besides test running to generate profiling data.
> Regards, Jeroen
> 2015-10-27 1:39 GMT+01:00 Vitaly Davidovich <vitalyd at>:
>> Is there more info on aggressive lambda inlining? If it's what I think it
>> is, it would be very useful performance wise.
>> sent from my phone
>> On Oct 25, 2015 12:51 PM, "Jeroen Borgers" <jborgers at>
>> wrote:
>>> Hi,
>>> One of the goals of Jigsaw I read here:
>>> is:
>>> *Enable ahead-of-time, whole-program optimization techniques*  -
>>> [..]
>>> The optimization techniques envisioned here include, but are not limited
>>> to: Fast lookup of both JDK and application classes; early bytecode
>>> verification; aggressive inlining of, *e.g.*, lambda expressions, and
>>> other
>>> standard compiler optimizations; construction of JVM-specific memory
>>> images
>>> that can be loaded more efficiently than class files; ahead-of-time
>>> compilation of method bodies to native code; and the removal of unused
>>> fields, methods, and classes. These kinds of techniques tend to work best
>>> when JDK and application code is analyzed together, prior to run time.
>>> [..]
>>>    -
>>>    *Optimize existing code as-is* — It must be possible to apply the
>>>    optimizer tool to existing code already packaged in traditional jar
>>> files,
>>>    without changing those files.
>>>    -
>>>    *Actual optimizations* — As a proof of concept, provide at least two
>>>    optimizations that deliver nontrivial performance benefits.
>>> My questions are:
>>> * What is the current state? Which techniques/optimizations are already
>>> implemented and available from the current ea JDK 9 or will be?
>>> * Are there any new insights/developments in this area?
>>> * I noticed in my JMH microbenchmark with parallelstream and lambda's
>>> that
>>> it runs slightly faster on 9_b85 compared to 8_u66. Could this be caused
>>> by
>>> more aggressive inlining of lambda's?
>>> * It seems to me that some compilation and optimization work is moved
>>> from
>>> runtime to link time, this will only be beneficial in limited cases,
>>> right?
>>> Are there obvious cases?
>>> * I don't really see why aggressive inlining and std optimizations can
>>> now
>>> be more effective. Because there will be less de-optimization events
>>> needed
>>> because of better predictability? Can in-lining now take place in two
>>> ways,
>>> between platform modules and application? Through interfaces?
>>> Thanks!
>>> -Jeroen

More information about the jigsaw-dev mailing list