RFR: 8337282: Speed up StringConcat with more simpleConcat
Shaojin Wen
duke at openjdk.org
Fri Jul 26 23:51:30 UTC 2024
On Fri, 26 Jul 2024 15:56:14 GMT, Shaojin Wen <duke at openjdk.org> wrote:
> StringConcatFactory improves startup speed and running performance through simpleConcat, but simpleConcat is currently given priority and only supports the following scenarios:
>
> // x instanceof Object
> prefix + x
> x = subfix
>
> // x instanceof Object && z instanceof Object
> x + y
>
>
> This PR improves startup and running performance by supporting more scenarios including
>
> // x instanceof byte/short/int/char/boolean/float/double
> prefix + x
> x + suffix
>
> // x instanceof byte/short/int/char/boolean/float/double/Integer/Long/Object
> prefix + suffix
>
> // x instanceof Object
> x + y + suffix
>
> // x instanceof Object
> x + y + suffix
To balance the number of methods, runtime performance, and startup performance, manually writing simpleConcat may still be necessary.
The four scenarios where the startup performance degraded seem a bit unbelievable, and I’m still looking for the reasons
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20355#issuecomment-2253654995
More information about the core-libs-dev
mailing list