On Tue, 16 Apr 2024 00:04:15 GMT, Scott Gibbons <sgibb...@openjdk.org> wrote:
>> This code makes an intrinsic stub for `Unsafe::setMemory` for x86_64. 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: > > Add enter() and leave(); remove Windows-specific register stuff I ran the benchmark again using a branch from openjdk today against this modification. Performance increased an average of 4.98x (max - 7.52x (unsafe 64-byte aligned), min - 3.02x (panama 255-byte aligned), stddev - 0.94x). I'll integrate after a second review has been done. Thanks! ------------- PR Comment: https://git.openjdk.org/jdk/pull/18555#issuecomment-2059637042