title: why dynamic array are slower than static array
body: <p>in my current project i need to  operate on large data array.
  so i do a stupid test to check which one will be better , but while trying below code i found dynamic arrays are much slower than static array why so ? or am i doing something wrong ?</p>
  
  <p>here is code (i remove vector (perform equal to dynamic) and boost array (equal to static) from here)</p>
  
  <p>result : static 8 , dynamic 7493</p>
  
  <pre><code>#include&lt;iostream&gt;
  #include&lt;vector&gt;
  
  
  using namespace std;
  using namespace boost;
  double arr_time;
  double darr_time;
  
  void arrr()
  {
  int arr[100000];
  LARGE_INTEGER start,end;
  QueryPerformanceCounter(&amp;start);
  
  for(int i=0 ; i &lt;100000 ; ++i)
  {
      arr[i] = 10 ;
  }
  for(int i=0 ; i &lt;100000 ; ++i)
  {
      int x = arr[i];
  }
  QueryPerformanceCounter(&amp;end);
  
  arr_time += (end.LowPart - start.LowPart);
  }
  
  void darr()
  {
  int *arr = new int[100000];
  LARGE_INTEGER start,end;
  QueryPerformanceCounter(&amp;start);
  
  for(int i=0 ; i &lt;100000 ; ++i)
  {
      arr[i] = 10 ;
  }
  for(int i=0 ; i &lt;100000 ; ++i)
  {
      int x = arr[i];
  }
  QueryPerformanceCounter(&amp;end);
  
  darr_time += (end.LowPart - start.LowPart);
  
  delete[] arr;
  }
  
  int main(int argc, char** argv)
  {
  for(int i= 0 ; i &lt;100 ; ++i)
  {
      arrr();
      darr();
  
  }
  cout&lt;&lt;"\n--------------------\n";
  cout&lt;&lt;arr_time&lt;&lt;endl;
  cout&lt;&lt;darr_time&lt;&lt;endl;
    return 0;
  }
  </code></pre>