[issue26200] SETREF adds unnecessary work in some cases

Serhiy Storchaka report at bugs.python.org
Mon Apr 11 03:06:25 EDT 2016


Serhiy Storchaka added the comment:

Here is a patch that adds extra usages of the Py_SETREF() macro (in particular in deque implementation). It doesn't fix bugs or improve performance, but makes the code shorter and perhaps makes it more readable.

If you think that some of these changes really improve readability (I think not all of them), let me know and I'll commit selected changes. Otherwise I'll just close this issue.

Currently Py_XSETREF is used 118 times and Py_SETREF is used 59 times. py_setref_extra.patch adds 44 new usages of Py_SETREF.

----------
Added file: http://bugs.python.org/file42428/py_setref_extra.patch

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


More information about the Python-bugs-list mailing list