STINNER Victor <victor.stin...@gmail.com> added the comment: > Removing this micro-optimization makes attribute access in namedtuple more > than 1.5 times slower: > Mean +- std dev: [python.default] 126 ns +- 4 ns -> [python] 200 ns +- 7 ns: > 1.58x slower (+58%)
I wrote the PR 3985, it's only 20 ns slower (1.3x slower): [ref] 80.4 ns +- 3.3 ns -> [fastcall] 103 ns +- 5 ns: 1.28x slower (+28%) Maybe Python was optimized further in the meanwhile, or the slowdown is higher on your computer? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue30156> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com