[pypy-issue] [issue767] copy.deepcopy is slower than cpython

Alex Gaynor tracker at bugs.pypy.org
Mon Jun 27 03:48:41 CEST 2011


Alex Gaynor <alex.gaynor at gmail.com> added the comment:

My assumption (no idea how to test this) is that the immense GC pressure is 
coming from the identityhash always reserving space in the tenured region.  My 
suggested solution is (on minimark): for objects in nursery return their 
address, and set a bit in the header saying that their hash was taken, then if 
they are moved to the tenured region, allocate an extra word in their header and 
store their previous address there to use as the identity hash.  This was it is 
basically free for young objects, and only slightly more expensive for old 
objects.

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue767>
________________________________________


More information about the pypy-issue mailing list