RFR: 8285001: Simplify StringLatin1.regionMatches
Claes Redestad
redestad at openjdk.java.net
Tue Apr 19 13:09:50 UTC 2022
There is no pair of character values in the latin1 range (0-255) that will make the condition at line 401 in `StringLatin1.java` true, so this test can be removed.
Added a test and a microbenchmark (which as expected sees a few ns/op improvement from this change). Took the opportunity to tune the default settings for the micro to reduce runtime from 30+ minutes to 3 with no discernible degradation of quality.
-------------
Commit messages:
- Add tests and micro
- Simplify latin1 to latin1 locale-independent comparisons in StringLatin1.regionMatchesCI
Changes: https://git.openjdk.java.net/jdk/pull/8292/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8292&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8285001
Stats: 94 lines in 3 files changed: 88 ins; 3 del; 3 mod
Patch: https://git.openjdk.java.net/jdk/pull/8292.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/8292/head:pull/8292
PR: https://git.openjdk.java.net/jdk/pull/8292
More information about the core-libs-dev
mailing list