[pypy-issue] Issue #3027: list.pop(0) ten times slower than on CPython (pypy/pypy)

arigo at bitbucket.org arigo at bitbucket.org
Mon Jun 17 10:28:20 EDT 2019


New issue 3027: list.pop(0) ten times slower than on CPython
https://bitbucket.org/pypy/pypy/issues/3027/listpop-0-ten-times-slower-than-on-cpython

Armin Rigo:

The following (bad) code runs 10 times slower on PyPy 2 or 3 than on CPython 2.x or 3.x.  Figure out why:

```
#!python

import time
lst = [[i, i] for i in range(62500)]
t = time.time()
while lst:
    lst.pop(0)
t2 = time.time()
print(t2 - t)
```




More information about the pypy-issue mailing list