Dennis Sweeney <sweeney.dennis...@gmail.com> added the comment:
I bisected the change to here: https://github.com/python/cpython/pull/19881 commit 3dd2157febae5087ca3333d24f69b6de9cbd13cd Author: Raymond Hettinger <rhettin...@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. ---------- nosy: +Dennis Sweeney _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43198> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com