title: C99 variable length automatic array performance
body: <p>Is there significant cpu/memory overhead associated with using automatic arrays with g++/Intel on 64-bit x86 linux platform?</p>
  
  <pre><code>int function(int N) {
      double array[N];
  </code></pre>
  
  <ul>
  <li><p>overhead compared to allocating array before hand (assuming function is called multiple times)</p></li>
  <li><p>overhead compared to using new</p></li>
  <li><p>overhead compared to using <code>malloc</code></p></li>
  </ul>
  
  <p>The range of N may be from 1kb to 16kb roughly, stack overrun is not a problem.</p>