On Fri, 5 Apr 2024 20:17:39 GMT, Naoto Sato <na...@openjdk.org> wrote:
> LGTM. The test case could be more thorough if it tests strings with > supplementary codepoints, as the new method computes them exclusively. I considered that, but the worst case is the x3 expansion. A 2 character high/low surrogate pair would result in 4 bytes of UTF-8, less than the 6 bytes needed for a 2 16 bit characters. The test doesn't run quickly already due to the large chunks of memory used. ------------- PR Comment: https://git.openjdk.org/jdk/pull/18663#issuecomment-2040681452