[Python-Dev] Making builtins more efficient

Steven Elliott selliott4 at austin.rr.com
Sat Apr 14 18:23:21 CEST 2007


;`On Thu, 2007-02-22 at 01:26 +0100, Giovanni Bajo wrote: 
> On 20/02/2007 16.07, Steven Elliott wrote:
> 
> > I'm finally getting back into this.  I'd like to take one more shot at
> > it with a revised version of what I proposed before.  
> > 
> > For those of you that did not see the original thread it was about ways
> > that accessing builtins could be more efficient.  It's a bit much to
> > summarize again now, but you should be able to find it in the archive
> > with this subject and a date of 2006-03-08.  
> 
> Are you aware of this patch, which is still awaiting review?
> https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1616125&group_id=5470

I was not aware of your patch.  I've since downloaded it, applied it,
and played with it a bit.

I find the cached module lookups (cached lookups when loading attributes
in modules via LOAD_ATTR) to be particularly interesting since it
addresses a case where PEP 280 leaves off.  

Your idea is to have an indexable array of objects that is only used
when the hash table has not been changed, which can be determined by the
timestamps you added.  That may be the best way of handling attributes
in modules (LOAD_ATTR).  For global variables (LOAD_GLOBAL) I'm curious
how it compares to PEP 280 and or Greg Ewing's idea.

-- 
-----------------------------------------------------------------------
|          Steven Elliott          |      selliott4 at austin.rr.com     |
-----------------------------------------------------------------------




More information about the Python-Dev mailing list