title: Is memset() more efficient than for loop in C?
body: <p>Is <code>memset()</code>  more efficient than <code>for</code> loop.</p>
  <p>Considering this code:</p>
  <pre><code>char x[500];
  memset(x,0,sizeof(x));
  </code></pre>
  <p>And this one:</p>
  <pre><code>char x[500];
  for(int i = 0 ; i &lt; 500 ; i ++) x[i] = 0;
  </code></pre>
  <p>Which one is more efficient and why? Is there any special instruction in hardware to do block level initialization.</p>