Serhiy Storchaka added the comment: Sorry, it was incorrect microbenchmark. Correct is:
$ ./python -m timeit -r 11 -s "from collections import namedtuple as n;a = n('n', 'a b c')(1, 2, 3)" -- "a.a" 3.4 : 1000000 loops, best of 11: 0.601 usec per loop 3.5 unpatched: 1000000 loops, best of 11: 0.445 usec per loop 3.5 patched : 1000000 loops, best of 11: 0.454 usec per loop There is small slowdown (2%), but it is only small part of the gain of the optimization. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24276> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com