> This PR suggests we speed up Character.toUpperCase and Character.toLowerCase
> for latin1 code points by applying the 'oldest ASCII trick in the book'.
>
> This takes advantage of the fact that latin1 uppercase code points are always
> 0x20 lower than their lowercase (with the exception of two code points which
> uppercase out of latin1).
>
> To verify the correctness of the new implementation, the test
> `Latin1CaseConversion` is added with an exhaustive verification of
> toUpperCase/toLowerCase for all latin1 code points.
>
> The implementation needs to balance the performance of the various ranges in
> latin1. An effort has been made to favour operations on ASCII code points,
> without causing excessive regression for higher code points.
>
> Performance is benchmarked for 7 chosen sample code points, each representing
> a range or a special-case. Results in the first comment.
Eirik Bjorsnos has updated the pull request incrementally with three additional
commits since the last revision:
- Allow any integer codePoint by defaulting to Integer.parseInt
- Rename Latin1CaseConversions to just CaseConversions
- Remove a whitespace following 'if ('
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/12623/files
- new: https://git.openjdk.org/jdk/pull/12623/files/70c624d7..bff999c4
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=12623&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=12623&range=01-02
Stats: 3 lines in 2 files changed: 0 ins; 0 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/12623.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/12623/head:pull/12623
PR: https://git.openjdk.org/jdk/pull/12623