On Wed, 29 Jan 2025 16:36:24 GMT, Shaojin Wen <[email protected]> wrote:
> The byte[] allocated in Integer/Long.toString is fully filled, so we can use
> Unsafe.allocateUninitializedArray to create byte[] to improve performance.
src/java.base/share/classes/java/lang/StringConcatHelper.java line 559:
> 557: static byte[] newArray(int length) {
> 558: return (byte[]) UNSAFE.allocateUninitializedArray(byte.class,
> length);
> 559: }
I think we should keep this check, as string concatenation seems to use this to
throw OOME.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23353#discussion_r1934548644