[pypy-dev] cpyext reference counting and other gc's

Armin Rigo arigo at tunes.org
Tue Apr 26 18:23:30 CEST 2011


Hi Dima,

On Mon, Apr 25, 2011 at 9:53 PM, Dima Tisnek <dimaqq at gmail.com> wrote:
> https://docs.google.com/document/d/1k7t-WIsfKW4tIL9i8-7Y6_9lo18wcsibyDONOF2i_l8/edit?hl=en

Can you explain a bit more what are the advantages of the solution you
propose, compared to what is already implemented in cpyext?  Your
description is far too high-level for us to know exactly what you
mean.

It seems that you want to replace the currently implemented solution
with a very different one.  I can explain it in a bit more details,
but I would first like to hear what goal you are trying to achieve.
Here is a quick reply based on guessing.  The issue with your version
is that Py_INCREF() and Py_DECREF() needs to do a slow dictionary
lookup, while ours doesn't.  Conversely, I believe that your version
doesn't need a dictionary lookup in other cases where ours needs to.
However it seems to me that if you add so much overhead to Py_INCREF()
and Py_DECREF(), you loose all other speed advantages.


A bientôt,

Armin.



More information about the Pypy-dev mailing list