RFR: 8333893: Optimization for StringBuilder append boolean & null [v12]
Shaojin Wen
duke at openjdk.org
Sun Jun 23 09:57:19 UTC 2024
On Thu, 20 Jun 2024 09:54:37 GMT, Claes Redestad <redestad at openjdk.org> wrote:
>> Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Utf16 case remove `append first utf16 char`
>
> src/java.base/share/classes/java/lang/StringLatin1.java line 832:
>
>> 830: // Don't use the putChar method, Its instrinsic will cause C2 unable to combining values into larger stores.
>> 831: long address = Unsafe.ARRAY_BYTE_BASE_OFFSET + index;
>> 832: Unsafe UNSAFE = Unsafe.getUnsafe();
>
> Perhaps better to put in a `private static final` field
already using `private static final UNSAFE`
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19626#discussion_r1650033405
More information about the core-libs-dev
mailing list