title: Stack constructor - What to put as initial capacity?
body: <p>One of the constructors shown on <a href="http://msdn.microsoft.com/en-us/library/2h9ztet0(v=vs.110).aspx" rel="nofollow">MSDN</a>, takes an <code>Int32</code> parameter representing the initial capacity. </p>
  
  <p>There is also a remark on the above documentation page which states the following:</p>
  
  <blockquote>
    <p>If Count is less than the capacity of the stack, Push is an O(1) operation. If the capacity needs to be increased to accommodate the new element, Push becomes an O(n) operation, where n is Count. Pop is an O(1) operation.</p>
  </blockquote>
  
  <p>I'm in a situation where I don't really know how much initial capacity to give my stack. Is it better to overestimate what you think you need ? Because surely a too low initial capacity would make the performance suffer? </p>
  
  <p>What is the drawback in passing in a high initial capacity in terms of performance?</p>