<i18n dev> RFR: 8302871: Speed up StringLatin1.regionMatchesCI [v10]

Eirik Bjorsnos duke at openjdk.org
Wed Feb 22 16:37:48 UTC 2023


On Wed, 22 Feb 2023 16:25:41 GMT, Martin Buchholz <martin at openjdk.org> wrote:

>> Eirik Bjorsnos has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Replace 'oldest ASCII trick in the book' use in toUpperCase, toLowerCase with "by removing (setting) a single bit"
>>  - Align local variable naming in toLowerCase, toUpperCase with equalsIgnoreCase by using 'lower' and 'upper'
>
> test/jdk/java/lang/String/CompactString/EqualsIgnoreCase.java line 89:
> 
>> 87:         for (int ab = 0; ab < 256; ab++) {
>> 88:             for (int bb = 0; bb < 256; bb++) {
>> 89:                 char a = (char) ab, b = (char) bb;
> 
> char is an unsigned numeric type, so cleaner is
> 
> for (char a = 0; a < 256; a++) 
> for (char b = 0; b < 256; b++)

Thanks, fixed. Might have been copied over from processing of code points in the higher planes. Not needed here.

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

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


More information about the i18n-dev mailing list