[Python-ideas] socket module: plain stuples vs named tuples
INADA Naoki
songofacandy at gmail.com
Wed Jul 5 19:16:00 EDT 2017
>
> Would there be any benefit in making a C implementation available from
> Python?
>
> -CHB
>
Yes, at startup time point of view.
Current Python namedtuple implementation uses `eval`.
It means we can't cache bytecode in pyc files.
For example, importing functools is not so fast and
its because `_CacheInfo` namedtuple for `lru_cache`.
And structseq is faster than Python namedtuple too.
ref:
http://bugs.python.org/issue28638#msg282412
Regards,
More information about the Python-ideas
mailing list