RFR: 8336856: Optimize String Concat [v17]
Shaojin Wen
duke at openjdk.org
Sun Jul 28 09:31:55 UTC 2024
> 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 44 commits:
- fix mix Integer null error
- fix stringSize build error
- Merge remote-tracking branch 'upstream/master' into optim_concat_factory_202407
- mix & prepend support Boolean/Integer/Long
- more micro benchmark
- rename simpleConcat -> makeSimpleConcat
- remove benchmark
- common simpleConcat
- add benchmark
- Descending mixer, same order as prepend
- ... and 34 more: https://git.openjdk.org/jdk/compare/2fbdbaca...f241462c
-------------
Changes: https://git.openjdk.org/jdk/pull/20273/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20273&range=16
Stats: 716 lines in 5 files changed: 583 ins; 42 del; 91 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
More information about the core-libs-dev
mailing list