You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling set is set_issuperset_impl() is already locked but calls set_issubset which
just wraps a lock to set_issubset_impl
Fixing it is very minimal, there is already a non lock very of set_is_subset, leading to just under 2x speedup on macos on free-threading
$ ./python -m timeit -s "a = set('abcdefgh'); b = set('abcd')" "a >= b"
before: 10000000 loops, best of 5: 35.4 nsec per loop
after: 20000000 loops, best of 5: 18.5 nsec per loop
$ ./python -m timeit -s "a = set('abcdefgh'); b = set('abcd')" "a.issuperset(b)"
before: 10000000 loops, best of 5: 38.7 nsec per loop
after: 10000000 loops, best of 5: 20.2 nsec per loop
Activity