On Tue, 1 Jul 2025 14:33:34 GMT, Brett Okken <d...@openjdk.org> wrote:

>  StreamEncoder/CharsetEncoder that is really forcing that - and the 
> conversion to utf-16 is required for optimal encoder performance.

It might be worth exploring the idea of using string-buffer as the buffer to 
carry the byte[] + coder (delaying the byte[] → char[] conversion) to the 
StreamEncoder, and then wrapping it as a StringCharBuffer all the way down to 
the charset/encoder layer. This could enable potential optimizations at 
individual charset encoder level.

It's unclear how significant the cost would be for the additional asb + scb 
wrapping and the access.

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

PR Comment: https://git.openjdk.org/jdk/pull/26022#issuecomment-3025232418

Reply via email to