From PR dotnet/coreclr#9598
dotnet/coreclr#9598 (comment)
Can JIT_MemSet be used and does it offer any improvement? (Not sure what path it gets used on) dotnet/coreclr#7198
Worth trying. I would call JIT_MemSet from the implementation of the PInvoke if it is available and faster. I would not call it directly from here. The condition for when it is available and faster potentially involves architectures, OS versions, and compiler/C-runtime versions. It is better for such condition to be on C++ side.