On Fri, 2 May 2025 06:41:14 GMT, Markus KARG <d...@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.

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.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/24773#issuecomment-2846530206

Reply via email to