Improve performance of __eq__

If the cardinality of two relations does not match, the expensive
rearrange procedure is not performed at all.
master
Salvo 'LtWorf' Tomaselli 2015-07-14 11:11:13 +07:00
parent f787630edb
commit c275c1caf3
1 changed files with 3 additions and 0 deletions

@ -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