Issue18797
Created on 2013-08-21 07:55 by rhettinger, last changed 2022-04-11 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| no_refcnt_dummy1.diff | rhettinger, 2013-08-21 07:55 | Use #ifdefs to remove dummy object refcount changes | review | |
| no_refcnt_dummy2.diff | rhettinger, 2013-08-21 17:48 | Version without #ifdef | review | |
| Messages (4) | |||
|---|---|---|---|
| msg195751 - (view) | Author: Raymond Hettinger (rhettinger) * ![]() |
Date: 2013-08-21 07:55 | |
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? |
|||
| msg195753 - (view) | Author: Antoine Pitrou (pitrou) * ![]() |
Date: 2013-08-21 08:14 | |
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. |
|||
| msg195810 - (view) | Author: Raymond Hettinger (rhettinger) * ![]() |
Date: 2013-08-21 17:48 | |
> I think we shouldn't distinguish between debug and non-debug mode. That makes good sense. Attaching a new patch without the #ifdefs. |
|||
| msg195904 - (view) | Author: Roundup Robot (python-dev) ![]() |
Date: 2013-08-22 15:20 | |
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 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:57:49 | admin | set | github: 62997 |
| 2013-08-22 16:01:38 | rhettinger | set | status: open -> closed resolution: fixed |
| 2013-08-22 15:20:43 | python-dev | set | nosy:
+ python-dev messages: + msg195904 |
| 2013-08-21 17:48:18 | rhettinger | set | files:
+ no_refcnt_dummy2.diff messages: + msg195810 |
| 2013-08-21 08:14:28 | pitrou | set | messages: + msg195753 |
| 2013-08-21 08:11:13 | pitrou | set | nosy:
+ tim.peters, Mark.Shannon |
| 2013-08-21 08:05:04 | rhettinger | set | nosy:
+ pitrou |
| 2013-08-21 07:55:45 | rhettinger | create | |

