On Fri, 2 May 2025 07:13:21 GMT, Shaojin Wen <s...@openjdk.org> wrote:
>>> ```java >>> > char[] ca = new char[end - off]; >>> ``` >>> >>> Your code here has a memory allocation, which may cause slowdown >> >> This is exactly what I wanted to express with my posting. > >> > ```java >> > > char[] ca = new char[end - off]; >> > ``` >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > Your code here has a memory allocation, which may cause slowdown >> >> This is exactly what I wanted to express with my posting. > > I agree with you that this PR can improve the performance of Reader's method > ` int read(char[] cbuf, int off, int len)`, but may not help the performance > of Reader::getChars. @wenshao Why did you remove UTF16::compress from your proposal? Wasn't it providing the expected benefit? ------------- PR Comment: https://git.openjdk.org/jdk/pull/24773#issuecomment-2888375783