title: Why is memcpy() faster?
body: <p>I'm curious why the <code>memcpy()</code> function is faster than the simple manual copy.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  #include &lt;time.h&gt;
  
  int main() 
  { 
      clock_t begin, end;
      double time_spent;
      int i, j;   
      char source[65536], destination[65536]; 
  
      begin = clock();
  
      for (j = 0; j&lt;1000; j++) 
          for (i = 0; i &lt; 65536; i++) destination[i] = source[i];
      //slower than memcpy(destination, source, 65536);
  
      end = clock();
      time_spent = (double)(end - begin) / CLOCKS_PER_SEC;
      printf("%Lf\n",time_spent);
      system("pause");
  } 
  </code></pre>
  
  <p>Doesn't the implementation of <code>memcpy()</code> do the same thing?
  Thanks in advance.</p>