Serhiy Storchaka added the comment: The regression was added by the fix for issue26811. PR 1272 applies the alternate patch from issue26811. This doesn't harm the performance.
$ ./python.patched -m perf timeit -q --compare-to ./python.default -s "from collections import namedtuple; P = namedtuple('P', 'x y'); p = P(1, 2)" --duplicate 1000 "p.x" Mean +- std dev: [python.default] 128 ns +- 7 ns -> [python.patched] 121 ns +- 7 ns: 1.05x faster (-5%) I thought about tests, but I don't know what is the best place for them. Seems other environment variables that controls debug output are not tested too. ---------- nosy: +haypo stage: -> patch review versions: +Python 3.5, Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30156> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com