RFR: 8351140: RISC-V: Intrinsify Unsafe::setMemory [v14]

Anjian-Wen duke at openjdk.org
Wed May 21 11:23:55 UTC 2025


On Wed, 21 May 2025 09:48:49 GMT, Hamlin Li <mli at openjdk.org> wrote:

> > Thanks for your review! I think the above test results may not fully reflect the difference in the impact of aligned and unaligned on the tail? I understand that if the dest address is aligned, the above aligned section has 0 to 4 less store instructions than the following section. I can remove it and test jmh to see how it performs
> 
> Based on your last jmh data (check `MemorySegmentFillUnsafe.unsafe true 7` and `MemorySegmentFillUnsafe.unsafe false 7`, and others <= 7, they're the same. I guess the pipeline and store buffer deal with this continuous stores well enough.

The last change on the code after L_fill_elements make the byte store 1 by 1, it seems that 'true' or 'false' may not affect it when the count is less or equal 7?
I think the above align section is like a fast path which can reduce instruction for the count is large than 7, so we may should check the result when count > 7 ? besides, I'm testing on that right now(delete the align tail part), we can find it out later

-------------

PR Comment: https://git.openjdk.org/jdk/pull/23890#issuecomment-2897579925


More information about the hotspot-compiler-dev mailing list