RFR: 8165492: Reduce number of lambda forms generated by MethodHandleInlineCopyStrategy

Claes Redestad claes.redestad at oracle.com
Thu Sep 8 19:37:28 UTC 2016


On 2016-09-08 20:56, Aleksey Shipilev wrote:
> Hi,
> On 09/08/2016 08:03 PM, Claes Redestad wrote:
>> Webrev: http://cr.openjdk.java.net/~redestad/8165492/webrev.01/
> It is a bit sad that we have to bust the doors with internal APIs, and
> not use the public API, thus robbing ourselves of the opportunity to
> optimize the public API for a wide range of use cases.

optimizing the public API would of course be ideal, and perhaps there's
some ways improve the current impl under the hood that would remove the
need for slightly odd, compound operations like this new foldArguments.

I have some ideas, but, time is running short for 9. Just allowing
this one in might be trying the patience of some people. :-)

> Barring that, the patch looks good.


>> On 09/08/2016 09:21 PM, Paul Sandoz wrote:
>> Did you consider replacing the if block with an assert? presumably if
>> it is non-zero it is an internal error?
> The original check was to guard against Unsafe.allocateUnitializedArray
> usage, and so I would like to keep the code that checks the index
> unconditionally. asserts can be disabled.

I have been down the road of trying to make this an assertion to get
rid of the LF shapes and was dissuaded.

Having found another (better?) way to get rid of the startup cost of
having this check my concerns are resolved. Also, dropping the check
entirely from this patch doesn't show a significant improvement on
micros (at least for C2).



More information about the core-libs-dev mailing list