How is Array.Copy implemented in C#? -


i tried @ implementation of array.copy in c# ilspy didn't show me implementation itself.

i wrote simple benchmark, array.copy vs simple loop copy data. array.copy faster.

how implemented faster?

thanks, shay

same techniques used write fast memcpy function:

  • loop unrolling
  • transfer of aligned data in large chunks (often using simd)
  • cpu caching hints (simd helps here well)

see also:


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -