New issue 2881: List strategies: switching to object can create more memory 
pressure than expected
https://bitbucket.org/pypy/pypy/issues/2881/list-strategies-switching-to-object-can

Armin Rigo:

Here's a case where memory pressure increases much more than naively expected:

```
#! python

lst = [0] * (10**8)
lst[0] = 'X!'
```

That's because the switch to the object strategy will create 100 million new 
copies of the object ``0``, whereas on CPython the list contains 100 million 
references to the same object ``0``.


_______________________________________________
pypy-issue mailing list
pypy-issue@python.org
https://mail.python.org/mailman/listinfo/pypy-issue

Reply via email to