On Sun, 25 Aug 2024 12:12:42 GMT, Shaojin Wen <d...@openjdk.org> wrote:
>> This is a follow-up to PR #20273, which improves performance when the number >> of parameters exceeds 20. >> >> When the number of parameters is large, the possibility of reuse will be >> lower, so we can use the static concat method and write the length and coder >> directly into the bytecode to solve the performance regression problem. > > Shaojin Wen has updated the pull request incrementally with one additional > commit since the last revision: > > Revert "Optimize the construction of MethodType and MethodTypeDesc to > reduce memory allocation" > > This reverts commit 3bed7290f5cb987e86407f698fb0598f19d65628. src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java line 1169: > 1167: paramTypes[i] = cl; > 1168: } > 1169: return changed ? MethodType.methodType(args.returnType(), > paramTypes) : args; Suggestion: return changed ? MethodType.methodType(args.returnType(), paramTypes, true) : args; ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20675#discussion_r1730375667