• Victor Stinner's avatar
    bpo-30156: Remove property_descr_get() optimization (GH-9541) · e972c136
    Victor Stinner yazdı
    property_descr_get() uses a "cached" tuple to optimize function
    calls. But this tuple can be discovered in debug mode with
    sys.getobjects(). Remove the optimization, it's not really worth it
    and it causes 3 different crashes last years.
    
    Microbenchmark:
    
    ./python -m perf timeit -v \
        -s "from collections import namedtuple; P = namedtuple('P', 'x y'); p = P(1, 2)" \
        --duplicate 1024 "p.x"
    
    Result:
    
    Mean +- std dev: [ref] 32.8 ns +- 0.8 ns -> [patch] 40.4 ns +- 1.3 ns: 1.23x slower (+23%)
    e972c136
Adı
Son kayıt (commit)
Son güncelleme
..
next Loading commit data...
3.5.0.rst Loading commit data...
3.5.0a1.rst Loading commit data...
3.5.0a2.rst Loading commit data...
3.5.0a3.rst Loading commit data...
3.5.0a4.rst Loading commit data...
3.5.0b1.rst Loading commit data...
3.5.0b2.rst Loading commit data...
3.5.0b3.rst Loading commit data...
3.5.0b4.rst Loading commit data...
3.5.0rc1.rst Loading commit data...
3.5.0rc2.rst Loading commit data...
3.5.0rc3.rst Loading commit data...
3.5.0rc4.rst Loading commit data...
3.5.1.rst Loading commit data...
3.5.1rc1.rst Loading commit data...
3.5.2.rst Loading commit data...
3.5.2rc1.rst Loading commit data...
3.5.3.rst Loading commit data...
3.5.3rc1.rst Loading commit data...
3.5.4.rst Loading commit data...
3.5.4rc1.rst Loading commit data...
3.5.5.rst Loading commit data...
3.5.5rc1.rst Loading commit data...
3.6.0.rst Loading commit data...
3.6.0a1.rst Loading commit data...
3.6.0a2.rst Loading commit data...
3.6.0a3.rst Loading commit data...
3.6.0a4.rst Loading commit data...
3.6.0b1.rst Loading commit data...
3.6.0b2.rst Loading commit data...
3.6.0b3.rst Loading commit data...
3.6.0b4.rst Loading commit data...
3.6.0rc1.rst Loading commit data...
3.6.0rc2.rst Loading commit data...
3.6.1.rst Loading commit data...
3.6.1rc1.rst Loading commit data...
3.6.2.rst Loading commit data...
3.6.2rc1.rst Loading commit data...
3.6.2rc2.rst Loading commit data...
3.6.3.rst Loading commit data...
3.6.3rc1.rst Loading commit data...
3.6.4.rst Loading commit data...
3.6.4rc1.rst Loading commit data...
3.6.5.rst Loading commit data...
3.6.5rc1.rst Loading commit data...
3.6.6.rst Loading commit data...
3.6.6rc1.rst Loading commit data...
3.7.0.rst Loading commit data...
3.7.0a1.rst Loading commit data...
3.7.0a2.rst Loading commit data...
3.7.0a3.rst Loading commit data...
3.7.0a4.rst Loading commit data...
3.7.0b1.rst Loading commit data...
3.7.0b2.rst Loading commit data...
3.7.0b3.rst Loading commit data...
3.7.0b4.rst Loading commit data...
3.7.0b5.rst Loading commit data...
3.7.0rc1.rst Loading commit data...