RFR: 8349176: Speed up Integer/Long.toString via StringConcatHelper::newArray [v3]
Roger Riggs
rriggs at openjdk.org
Fri May 2 17:37:54 UTC 2025
On Fri, 2 May 2025 03:55:24 GMT, Shaojin Wen <swen at openjdk.org> wrote:
>> The byte[] allocated in Integer/Long.toString is fully filled, so we can use StringConcatHelper::newArray to create byte[] to improve performance.
>
> Shaojin Wen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains eight commits:
>
> - Merge remote-tracking branch 'upstream/master' into allocate_un_init_202501
>
> # Conflicts:
> # src/java.base/share/classes/java/lang/Integer.java
> # src/java.base/share/classes/java/lang/Long.java
> - use StringConcatHelper.newArray
> - simplify
> - use Unsafe.allocateUninitializedArray
> - revert StringConcatHelper newArray change
> - copyright
> - remove duplicate check
> - allocateUninitializedArray
The StringConcatHelper methods should not be used outside of StringConcat.
-------------
Changes requested by rriggs (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/23353#pullrequestreview-2812563398
More information about the core-libs-dev
mailing list