Re: RFR: 8349176: Speed up Integer/Long.toString via Unsafe.allocateUninitializedArray [v2]

2025-04-04 Thread Shaojin Wen
> The byte[] allocated in Integer/Long.toString is fully filled, so we can use > Unsafe.allocateUninitializedArray to create byte[] to improve performance. Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: use StringConcatHelper.newArra

Re: RFR: 8349176: Speed up Integer/Long.toString via Unsafe.allocateUninitializedArray

2025-03-09 Thread Shaojin Wen
On Wed, 29 Jan 2025 16:36:24 GMT, Shaojin Wen wrote: > The byte[] allocated in Integer/Long.toString is fully filled, so we can use > Unsafe.allocateUninitializedArray to create byte[] to improve performance. Keep it alive. - PR Comment: https://git.openjdk.org/jdk/pull/23353#issu

Re: RFR: 8349176: Speed up Integer/Long.toString via Unsafe.allocateUninitializedArray

2025-01-31 Thread Chen Liang
On Wed, 29 Jan 2025 16:36:24 GMT, Shaojin Wen 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: st

Re: RFR: 8349176: Speed up Integer/Long.toString via Unsafe.allocateUninitializedArray

2025-01-31 Thread Shaojin Wen
On Wed, 29 Jan 2025 16:36:24 GMT, Shaojin Wen wrote: > The byte[] allocated in Integer/Long.toString is fully filled, so we can use > Unsafe.allocateUninitializedArray to create byte[] to improve performance. This change demonstrates 2–23% speed improvements across multiple aarch64/x64 scenari

RFR: 8349176: Speed up Integer/Long.toString via Unsafe.allocateUninitializedArray

2025-01-31 Thread Shaojin Wen
The byte[] allocated in Integer/Long.toString is fully filled, so we can use Unsafe.allocateUninitializedArray to create byte[] to improve performance. - Commit messages: - simplify - use Unsafe.allocateUninitializedArray - revert StringConcatHelper newArray change - copyright -