[issue28638] Optimize namedtuple creation

Jelle Zijlstra report at bugs.python.org
Wed Jul 19 01:39:47 EDT 2017


Jelle Zijlstra added the comment:

Thanks Joe! I adapted your benchmark suite to also run my implementation. See https://github.com/JelleZijlstra/cnamedtuple/commit/61b6fbf4de37f8131ab43c619593327004974e52 for the code and results. The results are consistent with what we've seen before.

Joe's cnamedtuple is about 40x faster for class creation than the current implementation, and my PR only speeds class creation up by 4x. That difference is big enough that I think we should seriously consider using the C implementation.

----------

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


More information about the Python-bugs-list mailing list