title: Why is memcmp so much faster than a for loop check?
body: <p>Why is <code>memcmp(a, b, size)</code> so much faster than:</p>
  
  <pre><code>for(i = 0; i &lt; nelements; i++) {
      if a[i] != b[i] return 0;
  }
  return 1;
  </code></pre>
  
  <p>Is memcmp a CPU instruction or something? It must be pretty deep because I got a massive speedup using <code>memcmp</code> over the loop.</p>