New submission from Rasmus Villemoes:
Somewhat related to #23971, but with the opposite sign: Using Py_SIZE on a
PyDictObject gives the ma_fill member in 2.7 (and until 3.2 AFAICT), not the
ma_used member. So calling dict.fromkeys(d) overallocates significantly if a
lot of elements have been
New submission from Rasmus Villemoes:
This is mostly an RFC patch. It compiles and passes the test suite. A somewhat
silly microbenchmark such as
./python -m timeit -s 'import copy; x = dict([(str(x), x) for x in
range(1)]);' 'copy.deepcopy(x)'
runs about 30x fast
Rasmus Villemoes added the comment:
New version, addressing (hopefully) all review comments.
--
Added file: http://bugs.python.org/file45400/deepcopy.patch
___
Python tracker
<http://bugs.python.org/issue28