Message282412
I think external cache system introduces more complexity and startup overhead than AC.
I think functools is the only "very common" module using namedtuple, because
`functools.wraps()` is used to create decorator functions.
But if general solution for all namedtuple is necessary to make agreement,
I think C implemented namedtuple may be better.
structseq is faster than namedtuple, not only when building type, but also
using instance.
$ ./python -m perf timeit -s 'import sys; vi = sys.version_info' -- 'vi.major, vi.minor, vi.micro'
.....................
Median +- std dev: 130 ns +- 2 ns
$ ./python -m perf timeit -s 'from collections import namedtuple; VersionInfo=namedtuple("VersionInfo", "major minor micro releaselevel serial"); vi=VersionInfo(3, 7, 0, "alpha", 0)' -- 'vi.major, vi.minor, vi.micro'
.....................
Median +- std dev: 212 ns +- 4 ns |
|
Date |
User |
Action |
Args |
2016-12-05 10:48:19 | methane | set | recipients:
+ methane, rhettinger, ncoghlan, eric.smith, serhiy.storchaka, xiang.zhang |
2016-12-05 10:48:19 | methane | set | messageid: <1480934899.88.0.552751853151.issue28638@psf.upfronthosting.co.za> |
2016-12-05 10:48:19 | methane | link | issue28638 messages |
2016-12-05 10:48:19 | methane | create | |
|