RFR: 8337282: Speed ​​up StringConcat with more simpleConcat

Shaojin Wen duke at openjdk.org
Fri Jul 26 16:04:46 UTC 2024


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

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

Commit messages:
 - more simpleConcat

Changes: https://git.openjdk.org/jdk/pull/20355/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20355&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8337282
  Stats: 550 lines in 4 files changed: 509 ins; 15 del; 26 mod
  Patch: https://git.openjdk.org/jdk/pull/20355.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/20355/head:pull/20355

PR: https://git.openjdk.org/jdk/pull/20355


More information about the core-libs-dev mailing list