[issue18797] Don't needlessly change refcounts of dummy objects for sets
Roundup Robot added the comment: New changeset ac6dab1819c4 by Raymond Hettinger in branch 'default': Issue 18797: Remove unneeded refcount adjustments for dummy objects. http://hg.python.org/cpython/rev/ac6dab1819c4 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18797 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18797] Don't needlessly change refcounts of dummy objects for sets
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18797 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18797] Don't needlessly change refcounts of dummy objects for sets
New submission from Raymond Hettinger: AFAICT, there is no reason for sets to incref and decref dummy objects. The dummy object address is used as placeholders in the hash table but it is never accessed by set the logic. As long the one reference is held at the time the dummy object is created, nothing further is served by the increfs and decrefs. I can take them out entirely or use ifdefs to keep them for debug builds. Does anyone know of any issues? -- components: Interpreter Core files: no_refcnt_dummy1.diff keywords: patch messages: 195751 nosy: rhettinger priority: normal severity: normal status: open title: Don't needlessly change refcounts of dummy objects for sets type: performance versions: Python 3.4 Added file: http://bugs.python.org/file31394/no_refcnt_dummy1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18797 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18797] Don't needlessly change refcounts of dummy objects for sets
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18797 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18797] Don't needlessly change refcounts of dummy objects for sets
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +Mark.Shannon, tim.peters ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18797 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18797] Don't needlessly change refcounts of dummy objects for sets
Antoine Pitrou added the comment: I can't think of any counter-indication but I think we shouldn't distinguish between debug and non-debug mode. That way the debug hooks can check that the refcounting optimization is right. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18797 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18797] Don't needlessly change refcounts of dummy objects for sets
Raymond Hettinger added the comment: I think we shouldn't distinguish between debug and non-debug mode. That makes good sense. Attaching a new patch without the #ifdefs. -- Added file: http://bugs.python.org/file31402/no_refcnt_dummy2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18797 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com