On Tue, 7 Oct 2025 22:18:58 GMT, Roger Riggs <[email protected]> wrote:
>> Xueming Shen has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> minor api doc updates
>
> src/java.base/share/classes/jdk/internal/lang/CaseFolding.java.template line
> 230:
>
>> 228: private static class CaseFoldingEntry {
>> 229: final int cp;
>> 230: final char[] folding;
>
> Consider storing the folding as a int or long directly to avoid the overhead
> of small char arrays.
> Arrange to be able to compare the whole replacement with another codePoint,
> etc.
I misunderstood the algorithm when comparing folded characters against
non-folded sequences.
I still think a fast path for single character replacements will lower memory
costs and improve performance.
The case of single-codepoint to single-codepoint dominates the case folding
mappings.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27628#discussion_r2413846987