On Wed, 28 Aug 2024 09:57:42 GMT, Maurizio Cimadamore <mcimadam...@openjdk.org> 
wrote:

> Ok, I suppose what you do get is the auto-detection of charset length, which 
> adjusts the size of the copy...

NVM, this is not what this impl is doing. I see no performance benefit for 
using the new API over a `copy`. If so, this new API is just for ease of use. 
While that's ok, IMHO it's not an easy API to add, as we're making a number of 
arbitrary choices here:
* what to do with terminators in the middle of the string
* whether length is length of string in chars, or length in bytes (we do the 
latter)

This leaves me a bit skeptical that this API is the right primitive.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20725#discussion_r1734379824

Reply via email to