On Tue, 3 Sep 2024 13:22:41 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:
>
> countGreaterThanZero -> CountNonNegatives
src/java.base/share/classes/java/lang/StringCoding.java line 41:
> 39: * Count the number of String::value leading non-negatives in the
> range.
> 40: */
> 41: public static int countNonNegatives(String s) {
No, this is wrong, `NonNegatives` implies zeroes. I meant that `countPositives`
should be renamed `countNonNegatives` in a future enhancement to more precisely
reflect what it does. That's finicky since it's intrinsified and requires
coordination with runtime code, though.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20772#discussion_r1742216866