On Mon, 10 Jun 2024 12:12:58 GMT, Shaojin Wen <d...@openjdk.org> wrote:

> 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.

Whether increments are handled or not, I think the `StringUTF16.putChar` 
intrinsic might be getting in the way here and prevent merging consecutive 
"char" stores into 4 or 8 byte stores. It would be interesting to get numbers 
for the `putChar` version with the intrinsic disabled 
(`-XX:+UnlockDiagnosticVMOptions -XX:DisableIntrinsic=_putCharStringU`).

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

PR Comment: https://git.openjdk.org/jdk/pull/19626#issuecomment-2159509806

Reply via email to