> 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.
Claes Redestad has updated the pull request incrementally with one additional commit since the last revision: Update src/java.base/share/classes/java/lang/invoke/DirectMethodHandle.java Co-authored-by: Chen Liang <li...@openjdk.org> ------------- Changes: - all: https://git.openjdk.org/jdk/pull/21035/files - new: https://git.openjdk.org/jdk/pull/21035/files/3231f967..9dba8eb7 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=21035&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=21035&range=01-02 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/21035.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/21035/head:pull/21035 PR: https://git.openjdk.org/jdk/pull/21035