Message280297
> 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 |
|
Date |
User |
Action |
Args |
2016-11-08 12:16:08 | methane | set | recipients:
+ methane, rhettinger, ncoghlan, serhiy.storchaka, xiang.zhang |
2016-11-08 12:16:08 | methane | set | messageid: <1478607368.52.0.435721278319.issue28638@psf.upfronthosting.co.za> |
2016-11-08 12:16:08 | methane | link | issue28638 messages |
2016-11-08 12:16:08 | methane | create | |
|