title: How is ArrayDeque faster than stack?
body: <p>According to javadoc, </p>
  
  <blockquote>
    <p>ArrayDeque class is likely to be faster than Stack when used as a stack</p>
  </blockquote>
  
  <p>I don't understand how can ArrayDeque be faster than stack. Suppose stack is implemented using linkedlist as follows:</p>
  
  <pre><code>Push: Insert new element at the head, teamp-&gt;next = head; head = temp 
  (where temp is the element to be inserted)
  Pop: Remove the element from head, and make head = head-&gt;next
  </code></pre>
  
  <p>For large number of elements, there will be a overhead for ArrayDeque to resize which won't be a case in Stack implemented using LinkedList. So how exactly is ArrayDeque faster than stack?</p>