RFR: 8311220: Optimization for StringLatin UpperLower [v8]
温绍锦
duke at openjdk.org
Mon Sep 18 04:11:31 UTC 2023
On Mon, 18 Sep 2023 03:00:25 GMT, Chen Liang <liach at openjdk.org> wrote:
>> 温绍锦 has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains ten additional commits since the last revision:
>>
>> - Merge remote-tracking branch 'upstream/master' into optimization_for_string_latin1_upper_lower
>> - Merge branch 'master' into optimization_for_string_latin1_upper_lower
>> - Merge branch 'master' of github.com:wenshao/jdk into optimization_for_string_latin1_upper_lower
>> - rename hasNotUpperCaseEx to hasUpperCaseMapping
>> - rename isLowerCaseEx to hasNotUpperCaseEx
>> - use hex literal
>> - add method CharacterDataLatin1#isLowerCaseEx
>> - remove unnecessary code
>> - optimization for StringLatin1 UpperLower
>
> src/java.base/share/classes/java/lang/CharacterDataLatin1.java.template line 93:
>
>> 91: }
>> 92:
>> 93: boolean hasUpperCaseMapping(int ch) {
>
> This method is incorrectly named; it actually tests that a char has no upper case mapping. I recommend fixing this by keeping the method name while removing the double `!` at this return and at the if down below to simplify the logic.
Now use a local variable notUpperCaseEx, I prefer this, without adding a method.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14751#discussion_r1328232378
More information about the core-libs-dev
mailing list