title: deque.popleft() vs list.pop(0), performance analysis
body: <p>According to <a href="https://stackoverflow.com/questions/32543608/deque-popleft-and-list-pop0-is-there-performance-difference">this question</a>, I checked the performance on my laptop.</p>
  
  <p>Surprisingly, I found that <code>pop(0)</code> from a <code>list</code> is faster than <code>popleft()</code> from a <code>deque</code> stucture:</p>
  
  <pre><code>python -m timeit 'l = range(10000)' 'l.pop(0)'
  </code></pre>
  
  <p>gives:</p>
  
  <blockquote>
    <p>10000 loops, best of 3: <strong>66 usec</strong> per loop</p>
  </blockquote>
  
  <p>While:</p>
  
  <pre><code>python -m timeit 'import collections' 'l = collections.deque(range(10000))' 'l.popleft()'
  </code></pre>
  
  <p>gives:</p>
  
  <blockquote>
    <p>10000 loops, best of 3: <strong>123 usec</strong> per loop</p>
  </blockquote>
  
  <p>Moreover, I checked the performance on jupyter finding the same outcome:</p>
  
  <pre><code>%timeit l = range(10000); l.pop(0)
  </code></pre>
  
  <blockquote>
    <p>10000 loops, best of 3: <strong>64.7 µs</strong> per loop</p>
  </blockquote>
  
  <pre><code>from collections import deque
  %timeit l = deque(range(10000)); l.popleft()
  </code></pre>
  
  <blockquote>
    <p>10000 loops, best of 3: <strong>122 µs</strong> per loop</p>
  </blockquote>
  
  <p>What is the reason?</p>