Message386817
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. |
|
Date |
User |
Action |
Args |
2021-02-11 03:27:04 | Dennis Sweeney | set | recipients:
+ Dennis Sweeney, rhettinger, zach.ware, eamartin |
2021-02-11 03:27:04 | Dennis Sweeney | set | messageid: <1613014024.96.0.483758756934.issue43198@roundup.psfhosted.org> |
2021-02-11 03:27:04 | Dennis Sweeney | link | issue43198 messages |
2021-02-11 03:27:04 | Dennis Sweeney | create | |
|