[Python-Dev] Optimization targets - refcount (original) (raw)
Aahz aahz at pythoncraft.com
Sat Apr 17 09:58:34 EDT 2004
- Previous message: [Python-Dev] Optimization targets - refcount
- Next message: [Python-Dev] Use case for class decorators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Apr 15, 2004, Jewett, Jim J wrote:
What if a few common (constant, singleton) objects (such as None, -1, 0, 1) were declared immortal at compile-time? They would be created at initial load in a special untracked pool, and their tpdealloc would do nothing. The slot for tracking references would still be there, but could be ignored -- even if it went negative. Since the reference count no longer has to be correct (for these objects), the reference counting macros could optimize to nothing when they know at compile time that they'll have one of these constant objects.
http://mail.python.org/pipermail/python-list/2003-September/thread.html#183710
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"I used to have a .sig but I found it impossible to please everyone..." --SFJ
- Previous message: [Python-Dev] Optimization targets - refcount
- Next message: [Python-Dev] Use case for class decorators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]