[issue12422] When deepcopying, don't store immutable objects in the memo dict

Alex Gaynor report at bugs.python.org
Mon Jun 27 17:29:45 CEST 2011


New submission from Alex Gaynor <alex.gaynor at gmail.com>:

All storing immutable objects in the memo dict does is slow stuff down, due to having a larger hash table, and on some other Python's causing hilarious levels of GC pressure.  Using http://paste.pocoo.org/show/421310/ as a benchmark, CPython get's a 2x speedup on the deepcopy portion, and PyPy a 20x.  Patch is attached.

----------
components: Library (Lib)
files: d.diff
keywords: patch
messages: 139300
nosy: alex
priority: normal
severity: normal
status: open
title: When deepcopying, don't store immutable objects in the memo dict
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file22497/d.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12422>
_______________________________________


More information about the Python-bugs-list mailing list