[mono] Unsafe.[Write/Read]Unaligned
doesn't unroll 64B blocks
#106822
Labels
Milestone
Unsafe.[Write/Read]Unaligned
doesn't unroll 64B blocks
#106822
In dotnet/perf-autofiling-issues#33182, we discovered that MonoJIT generates two
memcpy
calls forFor this scenario, MonoJIT takes the "safe" path in
mini_emit_memcpy_internal
(passessize / align > MAX_INLINE_COPIES
) instead of usingmini_emit_memcpy
that handles with copy unrolling.In comparison
Unsafe.As<byte, Block64>(ref dest) = Unsafe.As<byte, Block64>(ref src);
leads to:This is causing serious regression on MonoJIT dotnet/perf-autofiling-issues#33182 and more. Fixing this would bring over 400+ microbenchmark improvements (dotnet/perf-autofiling-issues#41406 (comment))
The text was updated successfully, but these errors were encountered: