On Tue, 8 Oct 2024 22:34:38 GMT, Shaojin Wen <s...@openjdk.org> wrote:
>> A simple optimization that eliminates the allocation of the >> MethodTypeDescImpl object when parameterCount is equal to 0 and eliminates >> the allocation of argNames when parameterCount is equal to 1 > > Shaojin Wen has updated the pull request incrementally with one additional > commit since the last revision: > > fix merge error src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java line 191: > 189: > 190: private static String argName(int i) { > 191: String argName = i < ARG_NAME_CACHE_SIZE ? ARG_NAME_CACHE[i] : > null; Just an idea, but perhaps could constant init `ARG_NAME_CACHE = { "arg$0", "arg$1", .. , "arg$7" };` and simplify this? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21399#discussion_r1792744321