8338591: Improve performance of MemorySegment::copy

Reviewed-by: mcimadamore
This commit is contained in:
Per Minborg 2024-09-05 13:10:24 +00:00
parent cb9f5c5791
commit 6be927260a
4 changed files with 293 additions and 13 deletions

View file

@ -1570,8 +1570,9 @@ public sealed interface MemorySegment permits AbstractMemorySegmentImpl {
@ForceInline
static void copy(MemorySegment srcSegment, long srcOffset,
MemorySegment dstSegment, long dstOffset, long bytes) {
copy(srcSegment, ValueLayout.JAVA_BYTE, srcOffset,
dstSegment, ValueLayout.JAVA_BYTE, dstOffset,
AbstractMemorySegmentImpl.copy((AbstractMemorySegmentImpl) srcSegment, srcOffset,
(AbstractMemorySegmentImpl) dstSegment, dstOffset,
bytes);
}