• Guido van Rossum's avatar
    *EXPERIMENTAL* speedup of slot_sq_item. This sped up the following · f4593e0b
    Guido van Rossum yazdı
    test dramatically:
    
        class T(tuple): __dynamic__ = 1
        t = T(range(1000))
        for i in range(1000): tt = tuple(t)
    
    The speedup was about 5x compared to the previous state of CVS (1.7
    vs. 8.8, in arbitrary time units).  But it's still more than twice as
    slow as as the same test with __dynamic__ = 0 (0.8).
    
    I'm not sure that I really want to go through the trouble of this kind
    of speedup for every slot.  Even doing it just for the most popular
    slots will be a major effort (the new slot_sq_item is 40+ lines, while
    the old one was one line with a powerful macro -- unfortunately the
    speedup comes from expanding the macro and doing things in a way
    specific to the slot signature).
    
    An alternative that I'm currently considering is sketched in PLAN.txt:
    trap setattr on type objects.  But this will require keeping track of
    all derived types using weak references.
    f4593e0b
Adı
Son kayıt (commit)
Son güncelleme
Demo Loading commit data...
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Python Loading commit data...
RISCOS Loading commit data...
Tools Loading commit data...
.cvsignore Loading commit data...
.hgtags Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
PLAN.txt Loading commit data...
README Loading commit data...
acconfig.h Loading commit data...
configure Loading commit data...
configure.in Loading commit data...
install-sh Loading commit data...
pyconfig.h.in Loading commit data...
setup.py Loading commit data...