RFR: 8213035: Pack MethodHandleInlineStrategy coder and length into a long

Claes Redestad claes.redestad at oracle.com
Mon Oct 29 15:17:12 UTC 2018


by packing the coder and length values into a long, and combining the 
length and coder mixers, we can reduce the number of MHs generated to 
set up String concatenations.

Theoretically we reduce the number of MHs created by up to a third, and 
real time improvements in startup tests exercising ISC typically hover 
around 10%. This optimization reverts JDK-8212597[1], so expressions 
that benefited from that of course sees a smaller or no added benefit.


I've attached a simple microbenchmark and performance results from 
running on x64 in the bug:
- Significant reduction in work needed to bootstrap a slew of 
concatenations, both on the initial bootstrap and when repeating similar 
concatenation shapes.
- For C2 the peak performance is more or less the same, with very small 
differences due slight differences in the generated code (both tiny 
improvements and tiny regressions).
- For C1 we see some regressions on some micros, at worst 1.2x
- For interpreter we see improvements around 1.1x on several micros

Testing: tier1-2 jdk and hs tests, sanity tested overflow conditions



[1] https://bugs.openjdk.java.net/browse/JDK-8212597

More information about the core-libs-dev mailing list