In my own experience, I have found that I cannot trust my intuition about anything when it comes to performance. Therefore, I use a quick and dirty benchmarking application (which I call "StupidPerformanceTricks"), which I use to test these scenarios. This is invaluable since I made all sorts of amazing and conflicting discoveries about performance tricks. It is also important to remember that you run your test application in release mode without a debugger application, because otherwise you will not get JIT optimizations, and these optimizations can significantly affect: method A can be slower than method B in debug mode, but much faster in release mode, with optimized code.
In general, my own testing experience shows that if your array is <~ 32 elements, you will get better performance by copying your own copy cycle - presumably because you do not have the method overhead, which can be significant. However, if the loop is larger than ~ 32 elements, you will get better performance using Array.Copy (). (If you copy ints or float or similar things, you can also learn Buffer.BlockCopy (), which is ~ 10% faster than Array.Copy () for small arrays.)
But all that was said, the real answer: "Write your own tests that most closely match these exact alternatives, wrap them in each loop, give the loop enough iterations to chew for at least 2-3 seconds, and then compare the alternatives yourself" .
source share