This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Dennis Sweeney
Recipients Dennis Sweeney, eamartin, rhettinger, zach.ware
Date 2021-02-11.03:27:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1613014024.96.0.483758756934.issue43198@roundup.psfhosted.org>
In-reply-to
Content
I bisected the change to here:

https://github.com/python/cpython/pull/19881
commit 3dd2157febae5087ca3333d24f69b6de9cbd13cd
Author: Raymond Hettinger <rhettinger@users.noreply.github.com>
Date:   Sun May 3 04:51:05 2020 -0700

    Simplify set entry insertion logic. (GH-19881)

"""Dictionaries no longer reuse dummy entries. Instead, dummies accumulate until cleared by resizes. That is a good strategy because it tightens the inner search loop and it makes the code cleaner. Here, we do the same thing for sets"""


It looks like this was a deliberate change to speed up lookups, but it also looks like it adversely affected this case.  With dictionaries, mutation typically occurs as setting a different value for the same key---no dummy entries get created, so dummy entries are less common. But with sets, mutation can only come from adding/discarding, so maybe this optimization is less worthwhile for sets.
History
Date User Action Args
2021-02-11 03:27:04Dennis Sweeneysetrecipients: + Dennis Sweeney, rhettinger, zach.ware, eamartin
2021-02-11 03:27:04Dennis Sweeneysetmessageid: <1613014024.96.0.483758756934.issue43198@roundup.psfhosted.org>
2021-02-11 03:27:04Dennis Sweeneylinkissue43198 messages
2021-02-11 03:27:04Dennis Sweeneycreate