[pypy-issue] [issue1522] In some cases, `set(itertools.ifilter(...` takes more memory than in CPython

Armin Rigo tracker at bugs.pypy.org
Thu Jul 4 18:40:35 CEST 2013

Armin Rigo <armin.rigo at gmail.com> added the comment:

Found the reason: it's because set(iterable) first converts the iterable into a
list.  But the problem here is that the list is very long (5000*5000/2 items
roughly), but contains a lot of duplicate items, so that the final set is only
5001 items long.

nosy: +arigo
status: unread -> chatting

PyPy bug tracker <tracker at bugs.pypy.org>

More information about the pypy-issue mailing list