On Thu, 29 Aug 2024 14:38:20 GMT, Shaojin Wen <s...@openjdk.org> wrote:
> Use fast path for ascii characters 1 to 127 to improve the performance of > writing Utf8Entry to BufferWriter. src/java.base/share/classes/jdk/internal/access/JavaLangAccess.java line 394: > 392: void inflateBytesToChars(byte[] src, int srcOff, char[] dst, int > dstOff, int len); > 393: > 394: boolean hasNegativeOrZeros(String s); Can you add some javadoc? All other methods here has javadoc for usage notes. src/java.base/share/classes/jdk/internal/classfile/impl/AbstractPoolEntry.java line 441: > 439: } > 440: else { > 441: int charLength = stringValue.length(); In the slow loop, you can remove everything before the `else` - we don't really need that optimistic writing any more ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20772#discussion_r1737913601 PR Review Comment: https://git.openjdk.org/jdk/pull/20772#discussion_r1737912744