On Tue, 23 Jul 2024 13:48:57 GMT, Chen Liang <li...@openjdk.org> wrote:
>> explicit array stores has the overhead of boundary checking. If putCharsAt >> of StringLatin1 is not implemented based on Unsafe, the performance will be >> worse than StringUTF16. >> >> Of course, this is a common problem. StringUTF16.putChar is equivalent to >> Unsafe.putChar, without boundary checking. I found in many test scenarios >> that the UTF16 version performs better than the StringLatin1 version. >> >> We may need to change some StringLatin1 related implementations to use >> Unsafe, otherwise users will turn off COMPACT_STRINGS to improve performance. > > Thank you for telling what the blocking issue is here. Does C2 not merge the > bound checks when it does the merge stores? Interesting, and I think a fix > from their side should be the way to go. MergeStore does not work when using StringUTF16.putChar, waiting for improvements from @eme64 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19626#discussion_r1688786926