I tried to look at the implementation of Array.Copy in C# with ILSpy but it didn’t show me the implementation itself.
I wrote a simple benchmark, Array.Copy vs a simple for loop to copy the data.
Array.Copy was faster.
How is it implemented faster?
Thanks,
Shay
Same techniques used to write a fast
memcpyfunction:See also: