> 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 with a new target base due to a merge or a rebase. The pull request now contains 19 commits: - add comments and format code - Merge remote-tracking branch 'upstream/master' into optim_concat_factory_202407 # Conflicts: # src/java.base/share/classes/java/lang/String.java # src/java.base/share/classes/java/lang/StringConcatHelper.java - fix WithSecurityManager error - 1. reduce change 2. add flag GENERATE_INLINE_COPY - Merge remote-tracking branch 'origin/optim_simple_concat_202407' into optim_concat_factory_202407 # Conflicts: # src/java.base/share/classes/java/lang/StringConcatHelper.java # src/java.base/share/classes/java/lang/System.java # src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java - merge from master - Merge remote-tracking branch 'upstream/master' into optim_simple_concat_202407 # Conflicts: # src/java.base/share/classes/java/lang/StringConcatHelper.java - reduce change & refactor - fix TRUSTED not work - non-MH-based implementation - ... and 9 more: https://git.openjdk.org/jdk/compare/476d2ae6...d9d493a0 ------------- Changes: https://git.openjdk.org/jdk/pull/20273/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20273&range=07 Stats: 410 lines in 5 files changed: 397 ins; 1 del; 12 mod Patch: https://git.openjdk.org/jdk/pull/20273.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/20273/head:pull/20273 PR: https://git.openjdk.org/jdk/pull/20273