◐ Shell
clean mode source ↗

bpo-30156: Remove property_descr_get() hack by vstinner · Pull Request #3985 · python/cpython

Skip to content

Navigation Menu

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

Remove the cached tuple which caused crashed, use
_PyObject_FastCall() instead.

Microbenchmark using:

    ./python -m perf timeit
        -s 'import collections;P=collections.namedtuple("P","x y");p=P(1, 2)'
        'p.x'

[ref] 80.4 ns +- 3.3 ns -> [fastcall] 103 ns +- 5 ns: 1.28x slower (+28%)

Labels