On Sun, 8 Sep 2024 05:01:53 GMT, Shaojin Wen <s...@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: > > from @ExE-Boss 's suggestion I think this is a reasonable addition and could prove to be an interesting tuning in some applications. But I'd prefer this to be an opt-in feature initially, i.e. setting `java.lang.invoke.StringConcat.cacheThreshold` default value to something like 256. Get the opt-in feature out into a release, advertise its presence, battle-test it and see if there's a sweet spot that we might converge towards as a default with empirical data. ------------- Changes requested by redestad (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/20675#pullrequestreview-2288571602