Author inada.naoki
Recipients eric.smith, inada.naoki, ncoghlan, rhettinger, serhiy.storchaka, xiang.zhang
Date 2016-12-05.10:48:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1480934899.88.0.552751853151.issue28638@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2016-12-05 10:48:19inada.naokisetrecipients: + inada.naoki, rhettinger, ncoghlan, eric.smith, serhiy.storchaka, xiang.zhang
2016-12-05 10:48:19inada.naokisetmessageid: <1480934899.88.0.552751853151.issue28638@psf.upfronthosting.co.za>
2016-12-05 10:48:19inada.naokilinkissue28638 messages
2016-12-05 10:48:19inada.naokicreate