RFR: 8333893: Optimization for StringBuilder append boolean & null [v17]

Shaojin Wen duke at openjdk.org
Sat Aug 24 06:27:26 UTC 2024


> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into primitive arrays by combining values ​​into larger stores.
> 
> This PR rewrites the code of appendNull and append(boolean) methods so that these two methods can be optimized by C2.

Shaojin Wen has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 19 additional commits since the last revision:

 - Merge remote-tracking branch 'upstream/master' into optim_str_builder_append_202406
 - Merge remote-tracking branch 'upstream/master' into optim_str_builder_append_202406
 - Merge remote-tracking branch 'upstream/master' into optim_str_builder_append_202406
 - replace unsafe with putChar
 - Merge remote-tracking branch 'upstream/master' into optim_str_builder_append_202406
 - private static final field `UNSAFE`
 - Utf16 case remove `append first utf16 char`
 - `delete` -> `setLength`
 - copyright 2024
 - optimization for x64
 - ... and 9 more: https://git.openjdk.org/jdk/compare/d881a7b4...61196ecd

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/19626/files
  - new: https://git.openjdk.org/jdk/pull/19626/files/d2dcc24d..61196ecd

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=19626&range=16
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19626&range=15-16

  Stats: 46886 lines in 1334 files changed: 26149 ins; 14297 del; 6440 mod
  Patch: https://git.openjdk.org/jdk/pull/19626.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19626/head:pull/19626

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


More information about the core-libs-dev mailing list