[issue18772] Fix gdb plugin for new sets dummy object

Raymond Hettinger report at bugs.python.org
Mon Aug 19 21:57:44 CEST 2013


Raymond Hettinger added the comment:

This is a bummer.  The internal comments made the claim that any python object would suffice.   The use of a unicode object was unfortunate because it isn't guaranteed to be unique (i.e. a user can legitimately store "<dummy>" as a valid member of a set).  As a consequence, the tight loops for the hash table lookups had to add special case checks for the dummy variables.  Eliminating those checks made the generated code shorter and faster.  It also paved the way for a future optimization for non-debug builds to eliminate all non-essential increfs and decrefs to the dummy object.

In other words, we're paying a price for the dummy object being printable as a string.

Antoine, thanks to the link to the python-dev discussion.  I hope we can come with a solution that doesn't involve going back to unicode objects.

----------

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


More information about the Python-bugs-list mailing list