RFR: 8336856: Optimize String Concat [v23]

Claes Redestad redestad at openjdk.org
Fri Aug 2 01:06:38 UTC 2024


On Fri, 2 Aug 2024 00:59:06 GMT, Shaojin Wen <duke at openjdk.org> wrote:

>> The current implementation of StringConcat is to mix the coder and length into a long. This operation will have some overhead for int/long/boolean types. We can separate the calculation of the coder from the calculation of the length, which can improve the performance in the scenario of concat int/long/boolean.
>> 
>> This idea comes from the suggestion of @l4es in the discussion of PR https://github.com/openjdk/jdk/pull/20253#issuecomment-2240412866
>
> Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fix performance regression caused by args.erase()

I think erasing arguments is needed for correctness - are you sure this was cause for observed regressions? e2b30b3  backed out a few other things, too.

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

PR Comment: https://git.openjdk.org/jdk/pull/20273#issuecomment-2264299852


More information about the core-libs-dev mailing list