On Tue, 3 Sep 2024 11:27:53 GMT, Shaojin Wen <[email protected]> wrote:
>> Use fast path for ascii characters 1 to 127 to improve the performance of
>> writing Utf8Entry to BufferWriter.
>
> Shaojin Wen has updated the pull request incrementally with one additional
> commit since the last revision:
>
> fix testcase
src/java.base/share/classes/java/lang/System.java line 2598:
> 2596:
> 2597: public boolean isLatin1(String s) {
> 2598: return s.coder() == String.LATIN1;
I recall JEP 254 authors made a point that the test for `COMPACT_STRINGS` in
`String#isLatin1()` helps JIT do better dead code elimination when running with
`-XX:-CompactStrings`. Also: no logic in access bridges. :)
Suggestion:
return s.isLatin1();
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20772#discussion_r1741969049