RFR: 8310159: Bulk copy with Unsafe::arrayCopy is slower compared to memcpy

Jatin Bhateja jbhateja at openjdk.org
Wed Nov 15 01:48:28 UTC 2023


On Wed, 15 Nov 2023 01:17:05 GMT, Steve Dohrmann <duke at openjdk.org> wrote:

>> @jatin-bhateja There is a sfence at line 781.
>
> Thanks, there is an store fence upon completion of the main loop for the large size code:
> 
> ![image](https://github.com/openjdk/jdk/assets/3858882/3bcea3c6-3bda-458c-aa7c-29ed6010cde2)

How will it handle multithreaded case where writer is busy copying 256 bytes in loop and reader try to access a location still not flushed out of write combining buffer.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16575#discussion_r1393529359


More information about the hotspot-compiler-dev mailing list