runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Investigate changes in Buffer.MemCopy to bring into Span.Clear

Open ahsonkhan opened this issue 9 years ago • 6 comments

From PR dotnet/coreclr#9598

https://github.com/dotnet/coreclr/pull/9598#issuecomment-280528642

I see you copied some of the code from Buffer.MemoryCopy... you may want to take a look at https://github.com/dotnet/coreclr/pull/9143 for the managed part of the implementation. It should be more efficient especially on AMD64 because it writes things out in 16/32/64-byte blocks and does not have the extra branches at the beginning/end to check for alignment. (For lengths >= 512/1024 it is probably better to stick to the native implementation.)

ahsonkhan avatar Feb 21 '17 19:02 ahsonkhan

dotnet/coreclr#9143 has been superseded by dotnet/coreclr#9786

hanblee avatar Feb 28 '17 00:02 hanblee

@joshfree @ahsonkhan Is this still on for .NET Core 2.0?

gkhanna79 avatar Apr 27 '17 19:04 gkhanna79

No, this can wait till 2.1.

ahsonkhan avatar Apr 27 '17 19:04 ahsonkhan

cc @GrabYourPitchforks

ahsonkhan avatar Mar 09 '18 20:03 ahsonkhan

Not sure what's being requested here. Span.Clear doesn't have alignment requirements and has already gone through an optimization pass.

GrabYourPitchforks avatar Mar 10 '18 02:03 GrabYourPitchforks

Closing per @GrabYourPitchforks' comment.

stephentoub avatar Mar 02 '20 02:03 stephentoub