Daniel Stutzbach <dan...@stutzbachenterprises.com> added the comment:
I've looked very quickly over your patches to try to figure what rule qualifies a tuple or dict as simple enough to be untracked, out of curiosity. For tuples, I think the rule is: If an object is immutable, and it points only to untracked objects, the object can be untracked. Is that right? If so, you could perform the same optimization on the frozenset() type. Why do empty tuples have to be tracked? The dict patch adds a boolean flag to the dict data structure to indicate whether the dict is being tracked or not. I think. Couldn't you use _PyObject_GC_IS_TRACKED() instead? What's the rule for when a dict can be tracked or untracked? Do you need to recheck the rule every time the dict is modified? ---------- nosy: +stutzbach _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4688> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com