Author inada.naoki
Recipients inada.naoki, ncoghlan, rhettinger, serhiy.storchaka, xiang.zhang
Date 2016-11-08.12:16:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1478607368.52.0.435721278319.issue28638@psf.upfronthosting.co.za>
In-reply-to
Content
> What is the main culprit, importing the collections module or compiling a named tuple?

In this time, later.
But collections module takes 1+ ms to import too.
I'll try to optimize it.

> Using namedtuple is not new in 3.6, thus this is not a regression that can be fixed at beta stage.

Make sense.

> More general solution would be to make namedtuple() using cached precompiled class and update the cache if it doesn't match namedtuple arguments.

What "precompiled class" means? pyc file? or source string to be
executed?

> Yet one solution is to make namedtuple() not using compiling, but return patched local class. But Raymond is against this.

I'll search the discussion.
I think anther solution is reimplement namedtuple by C.
As far as I remember, attrs [1] does it.

[1] https://pypi.python.org/pypi/attrs
History
Date User Action Args
2016-11-08 12:16:08inada.naokisetrecipients: + inada.naoki, rhettinger, ncoghlan, serhiy.storchaka, xiang.zhang
2016-11-08 12:16:08inada.naokisetmessageid: <1478607368.52.0.435721278319.issue28638@psf.upfronthosting.co.za>
2016-11-08 12:16:08inada.naokilinkissue28638 messages
2016-11-08 12:16:08inada.naokicreate