Improve performance of __eq__
If the cardinality of two relations does not match, the expensive rearrange procedure is not performed at all.
This commit is contained in:
parent
f787630edb
commit
c275c1caf3
@ -352,6 +352,9 @@ class relation (object):
|
||||
if not isinstance(other, relation):
|
||||
return False
|
||||
|
||||
if len(self.content) != len(other.content):
|
||||
return False
|
||||
|
||||
if set(self.header) != set(other.header):
|
||||
return False
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user