RFR: 8341755: Optimize argNames in InnerClassLambdaMetafactory
Chen Liang
liach at openjdk.org
Tue Oct 8 15:33:13 UTC 2024
On Tue, 8 Oct 2024 00:47:27 GMT, Shaojin Wen <swen at 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
More information about the core-libs-dev
mailing list