mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Gave __sub__/difference a factor of 2-5 speed boost.
This commit is contained in:
parent
334b4a5c39
commit
b8940393e9
1 changed files with 2 additions and 1 deletions
|
@ -223,9 +223,10 @@ class BaseSet(object):
|
||||||
return NotImplemented
|
return NotImplemented
|
||||||
result = self.__class__()
|
result = self.__class__()
|
||||||
data = result._data
|
data = result._data
|
||||||
|
otherdata = other._data
|
||||||
value = True
|
value = True
|
||||||
for elt in self:
|
for elt in self:
|
||||||
if elt not in other:
|
if elt not in otherdata:
|
||||||
data[elt] = value
|
data[elt] = value
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue