[Zope-dev] Re: hasattr implementation for Zope?
Tim Peters
tim.peters at gmail.com
Fri May 27 14:31:01 EDT 2005
[Jim Fulton, on cell dereferencing's (lack of) speed]
> This is amazing. Really amazing. I stand corrected.
Well, there's no mystery if you look at LOAD_FAST and LOAD_DEREF in
ceval.c; LOAD_DEREF is slower <wink>.
The relative speed of approaches changes across Python releases too.
For example, module global lookup benefited enormously from a long
string of "heroic optimizations" in Python's dict implementation. I
consider a difference under 10% to be in the noise, and clawing for
one as likely to become a pessimization as to remain an optimization
under the next release; e.g., there are some obvious ways to speed
LOAD_DEREF (although I don't think anyone at present cares enough to
work on that).
More information about the Zope-Dev
mailing list