[issue28638] Optimize namedtuple creation

INADA Naoki report at bugs.python.org
Wed Jul 19 04:00:23 EDT 2017


INADA Naoki added the comment:

I want to focus on pure Python implementation in this issue.

While "40x faster" is more 10x faster than "4x faster", C implementation
can boost only CPython and makes maintenance more harder.

And sometimes "more 10x faster" is not so important.
For example, say application startup takes 1sec and namedtuple
creation took 0.4sec of the 1sec:

  4x faster: 1sec -> 0.7sec  (-30%)
 40x faster: 1sec -> 0.61sec (-39%)

In this case, "4x faster" reduces 0.3sec and "more 10x faster" reduces
only 0.09sec.

Of course, 1.9x faster attribute access (http://bugs.python.org/issue28638#msg298499) is attractive.
But this issue is too long already.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28638>
_______________________________________


More information about the Python-bugs-list mailing list