RFR: 8329331: Intrinsify Unsafe::setMemory [v2]
ExE Boss
duke at openjdk.org
Tue Apr 2 09:18:00 UTC 2024
On Mon, 1 Apr 2024 21:30:19 GMT, Scott Gibbons <sgibbons at openjdk.org> wrote:
>> This code makes an intrinsic stub for `Unsafe::setMemory`. See [this PR](https://github.com/openjdk/jdk/pull/16760) for discussion around this change.
>>
>> Overall, making this an intrinsic improves overall performance of `Unsafe::setMemory` by up to 4x for all buffer sizes.
>>
>> Tested with tier-1 (and full CI). I've added a table of the before and after numbers for the JMH I ran (`MemorySegmentZeroUnsafe`).
>>
>> [setMemoryBM.txt](https://github.com/openjdk/jdk/files/14808974/setMemoryBM.txt)
>
> Scott Gibbons has updated the pull request incrementally with one additional commit since the last revision:
>
> Use non-sse fill (old left in)
src/hotspot/share/opto/library_call.hpp line 235:
> 233: bool inline_unsafe_copyMemory();
> 234:
> 235: bool inline_unsafe_setMemory();
Maybe remove the empty line between these `inline_unsafe_*Memory` methods?
Suggestion:
bool inline_unsafe_copyMemory();
bool inline_unsafe_setMemory();
src/hotspot/share/prims/unsafe.cpp line 391:
> 389: size_t sz = (size_t)size;
> 390:
> 391:
Suggestion:
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18555#discussion_r1546092398
PR Review Comment: https://git.openjdk.org/jdk/pull/18555#discussion_r1546093297
More information about the core-libs-dev
mailing list