small optimization.

This commit is contained in:
chriseth 2022-02-03 13:14:15 +01:00
parent 5faebbff39
commit db9028906a

View File

@ -514,12 +514,9 @@ bool Constraint::operator<(Constraint const& _other) const
return equality < _other.equality;
for (size_t i = 0; i < max(data.size(), _other.data.size()); ++i)
{
rational const& a = data.get(i);
rational const& b = _other.data.get(i);
if (a != b)
return a < b;
}
if (rational diff = data.get(i) - _other.data.get(i))
return diff < 0;
return false;
}