On Tue, 8 Oct 2024 00:47:27 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

`argNames[i]` is always `"arg$" + (i + 1)`. Maybe we can change all 
`argNames[x]` usage to a method like:

public static String argName(int i) {
    if (i < 8)
        return ARG_NAME_CACHE[i];
    return "arg$" + (i + 1);
}

Can we change the name to "Optimize argNames in InnerClassLambdaMetafactory"?

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

PR Comment: https://git.openjdk.org/jdk/pull/21399#issuecomment-2398382531
PR Comment: https://git.openjdk.org/jdk/pull/21399#issuecomment-2400146805

Reply via email to