Issue #2881: List strategies: switching to object can create more memory pressure than expected (pypy/pypy)
4 Sep
2018
4 Sep
'18
5:51 a.m.
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-obj... 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``.
2258
Age (days ago)
2258
Last active (days ago)
0 comments
1 participants
participants (1)
-
Armin Rigo