Skip to content

[GC] Could SVR::memcopy be more efficient? #110571

Open
@sfiruch

Description

@sfiruch

The ServerGC threads in my application spend approx. 50% of their time in SVR::memcopy

https://github.com/dotnet/runtime/blob/731a96b0018cda0c67bb3fab7a4d06538fe2ead5/src/coreclr/gc/gc.cpp#L1746-L1755

In x64 the relevant loop looks like this:

@loop:
mov rax, qword ptr [r10+r9*1]
mov qword ptr [r9], rax
lea r9, ptr [r9+0x8]
sub r11, 0x1
jnz 0x18016b901 <loop>

If I'm not mistaken, this is a regular memcpy, but without vectorization or other optimizations? Perhaps SVR::memcopy could be implemented with memcpy instead, which is more optimized?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-GC-coreclruntriagedNew issue has not been triaged by the area owner

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions