Hi Maciej,

On Mon, Dec 17, 2012 at 3:46 PM, Maciej Fijalkowski <[email protected]> wrote:
> If you have a dictionary, then the pypy object does not keep the cpy
> object alive (or the dictionary keeps both of them alive or some other
> stuff).

Obviouly it should be a dictionary with weak keys.  The values can be
raw addresses anyway, as the CPyExt objects don't move.

> Maybe we can something like what we do now with hashes of
> objects. Dictionary while in nursery and then add the link if it
> survives?

Yes, maybe, but first we should do it without this optimization.  Also
note that if a PyPy object was already old when we first asked for its
CPyExt object, then we need the dictionary anyway.  It's unclear how
common the optimization case is: accessing a few times a young
object's CPyExt equivalent (but not too often), and then continuing to
access it (often) when the young object was made old.


A bientôt,

Armin.
_______________________________________________
pypy-dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to