Serhiy Storchaka added the comment:
Microbenchmark for caching docstrings:
$ ./python -m perf timeit -s "from collections import namedtuple; names =
['field%d' % i for i in range(1000)]" -- "namedtuple('A', names)"
With sys.intern(): Mean +- std dev: 3.57 ms +- 0.05 ms
With Python-level caching: Mean +- std dev: 3.25 ms +- 0.05 ms
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue28638>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com