bpo-30156: Remove property_descr_get() hack by vstinner · Pull Request #3985 · python/cpython
Navigation Menu
- Notifications You must be signed in to change notification settings
- Fork 34.4k
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%)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters