RFR: 8364320: String encodeUTF8 latin1 with negatives [v2]

Roger Riggs rriggs at openjdk.org
Mon Aug 18 16:19:18 UTC 2025


On Fri, 1 Aug 2025 13:15:29 GMT, Brett Okken <duke at openjdk.org> wrote:

>> As suggested on mailing list, when encoding latin1 bytes to utf-8, we can count the leading positive bytes and in the case where there is a negative, we can copy all the positive values to the target byte[] prior to processing the remaining data 1 byte at a time.
>> 
>> https://mail.openjdk.org/pipermail/core-libs-dev/2025-July/149417.html
>
> Brett Okken has updated the pull request incrementally with one additional commit since the last revision:
> 
>   coding conventions

looks good.

Its fine to integrate the performance improvement as-is, if improvements are warranted, they can be applied more broadly in a later PR.

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

Marked as reviewed by rriggs (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/26597#pullrequestreview-3129049010
PR Comment: https://git.openjdk.org/jdk/pull/26597#issuecomment-3197573017


More information about the core-libs-dev mailing list