[issue29476] Simplify set_add_entry()

Serhiy Storchaka report at bugs.python.org
Wed Feb 8 12:57:26 EST 2017


Serhiy Storchaka added the comment:

I don't have good real-world example. Actually dict is used more often than set in such cases.

I agree with your arguments Raymond, in particular about your ranging of cases. But even if the bad case is hundreds times more rare than the good case, the total effect can be negative if the negative effect of the bad case is hundreds times larger that the positive effect of the good case. I checked timing just to be sure and was unpleasantly surprised that the negative effect is so large.

----------

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


More information about the Python-bugs-list mailing list