Commit a881695f authored by Martin Reinecke's avatar Martin Reinecke
Browse files

small performance tweaks

parent 5661787e
Pipeline #31954 passed with stages
in 4 minutes
...@@ -90,6 +90,8 @@ class MultiDomain(frozendict): ...@@ -90,6 +90,8 @@ class MultiDomain(frozendict):
if self is x: if self is x:
return True return True
x = MultiDomain.make(x) x = MultiDomain.make(x)
if self is x:
return True
if (self, x) in MultiDomain._compatCache: if (self, x) in MultiDomain._compatCache:
return True return True
commonKeys = set(self.keys()) & set(x.keys()) commonKeys = set(self.keys()) & set(x.keys())
...@@ -104,10 +106,11 @@ class MultiDomain(frozendict): ...@@ -104,10 +106,11 @@ class MultiDomain(frozendict):
if self is x: if self is x:
return True return True
x = MultiDomain.make(x) x = MultiDomain.make(x)
if (self, x) in MultiDomain._subsetCache: if self is x:
return True return True
if len(x) == 0: if len(x) == 0:
MultiDomain._subsetCache.add((self, x)) return True
if (self, x) in MultiDomain._subsetCache:
return True return True
for key in self.keys(): for key in self.keys():
if key not in x: if key not in x:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment