[issue23910] C implementation of namedtuple (WIP)
Joe Jevnik
report at bugs.python.org
Sun Apr 12 20:48:04 CEST 2015
Joe Jevnik added the comment:
# Original version / new python implementation
./python -m timeit -s "from collections import namedtuple;a = namedtuple('a', 'a b c')(1, 2, 3)" "a.a"
10000000 loops, best of 3: 0.07 usec per loop
# C implementation
./python -m timeit -s "from collections import namedtuple;a = namedtuple('a', 'a b c')(1, 2, 3)" "a.a"
10000000 loops, best of 3: 0.028 usec per loop
The fallback is the same implementation that is currently used so this should have no affect on pypi.
----------
Added file: http://bugs.python.org/file38905/namedtuple-indexer-update.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23910>
_______________________________________
More information about the Python-bugs-list
mailing list