[Python-Dev] Proposed PEP: Optimizing Global Variable and Attribute Access

Aahz Maruch aahz@rahul.net
Tue, 14 Aug 2001 07:03:36 -0700 (PDT)


Skip Montanaro wrote:
> 
>     The number of tracked objects should be relatively small.  All active
>     frames of all active threads could conceivably be tracking objects, but
>     this seems small compared to the number of functions defined in a given
>     application.

Hmmm?  That doesn't seem quite right to me.  That's just a knee-jerk
reaction, I don't have any real evidence.

As a side note, I'm not sure whether some mention should be made that
TRACK_OBJECT specifically does not work any differently from current
Python when it comes to threads.  That is, if it's a shared variable of
any sort, you need a mutex if you're going to perform multiple
operations on it.
-- 
                      --- Aahz (@pobox.com)

Hugs and backrubs -- I break Rule 6       <*>       http://www.rahul.net/aahz/
Androgynous poly kinky vanilla queer het Pythonista

I don't really mind a person having the last whine, but I do mind someone 
else having the last self-righteous whine.