On Tue, 29 Nov 2022 21:57:09 GMT, Claes Redestad <redes...@openjdk.org> wrote:
> `java.lang.invoke.LambdaForm.NamedFunction` has an `invoker` field acting as > a cache, but this field is only used for lambda form interpretation, thus not > very performance sensitive. > > Since the invoker is already cached in the method type hierarchy we could > replace it with a cache of the invocation type instead. This means cost to > retrieve an invoker for lambda form interpretation is only slightly affected > (a few ns/op that end up in the noise since interpretation already incur a > >50ns/op overhead on even the simplest forms), while speeding up bytecode > generation for `LF`s with `NamedFunction`s not holding a resolvedHandle. > > Being lazy about the creation of the type is not significantly beneficial > right now, but is done in anticipation of future changes that may better > defer bytecode spinning for `LambdaForm`s. Marked as reviewed by jvernee (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/11424