On Fri, 20 Jan 2017 22:30:16 +0900
INADA Naoki <songofaca...@gmail.com> wrote:
> >
> > Moving the refcount out of the PyObject will probably make increfs /
> > decrefs more costly, and there are a lot of them.  We'd have to see
> > actual measurements if a patch is written, but my intuition is that the
> > net result won't be positive.
> >
> > Regards
> >
> > Antoine.  
> 
> I agree with you.  But I have similar idea: split only PyGc_Head (3 words).

That sounds like an interesting idea.  Once an object is created, the
GC header is rarely accessed.  Since the GC header has a small constant
size, it would probably be easy to make its allocation very fast
(e.g. using a freelist).  Then the GC header is out of the way which
increases the cache efficiency of GC-tracked objects.

Regards

Antoine.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to