Integrated: 8340280: Avoid calling MT.invokerType() when creating LambdaForms

Claes Redestad redestad at openjdk.org
Wed Sep 18 07:04:22 UTC 2024


On Tue, 17 Sep 2024 09:28:02 GMT, Claes Redestad <redestad at openjdk.org> wrote:

> This PR exploits the observation that in many of the cases where we call `methodType.invokerType()` we immediately translate it into a `Name[]` where the only effect is to create an array with an additional leading `BasicType.L_TYPE` argument. Only in a subset of cases will a corresponding `invokerType()` be created later to bind the MH to an invoker.
> 
> Providing methods to bypass the creationg of such transient, intermediary `MethodType` creation avoids excessive allocations and adding types to the MT interning table that quickly become stale.
> 
> Number of executed bytecode on a trivial HelloLambda application drops locally from ~517k to ~505k.

This pull request has now been integrated.

Changeset: d23c59e4
Author:    Claes Redestad <redestad at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/d23c59e40812c9e3a5914193e68169dbdf6d09e5
Stats:     60 lines in 6 files changed: 17 ins; 12 del; 31 mod

8340280: Avoid calling MT.invokerType() when creating LambdaForms

Reviewed-by: liach, jvernee

-------------

PR: https://git.openjdk.org/jdk/pull/21035


More information about the core-libs-dev mailing list