RFR: 8351140: RISC-V: Intrinsify Unsafe::setMemory [v10]
Anjian-Wen
duke at openjdk.org
Sun May 18 12:16:46 UTC 2025
On Sun, 18 May 2025 03:40:05 GMT, Feilong Jiang <fjiang at openjdk.org> wrote:
>> Anjian-Wen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains one commit:
>>
>> RISC-V: Intrinsify Unsafe::setMemory
>
> src/hotspot/cpu/riscv/stubGenerator_riscv.cpp line 1749:
>
>> 1747: __ addi(to, to, 1);
>> 1748: __ subi(count, count, 1);
>> 1749: __ bnez(count, L_loop);
>
> If we unroll the byte storage, will there be additional performance gains when the `count` is less than 8?
yes, I think normally if we unroll the byte storage we can gains additional performance. But sometime the dest address may not be aligned with the count, make the performance very poor on some align sensitive hardware. An additional alignment is required, it seems store the bytes one by one with a loop may be a simple way with limited performance loss compare with it?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23890#discussion_r2094505521
More information about the hotspot-compiler-dev
mailing list