Small speed up in fields comparisons

This commit is contained in:
Vinnie Falco
2017-06-25 11:57:36 -07:00
parent 1c96e1604c
commit 90b51c5f79
2 changed files with 13 additions and 0 deletions

View File

@ -1,6 +1,7 @@
Version 68:
* Split common tests to a new project
* Small speed up in fields comparisons
API Changes:

View File

@ -104,6 +104,10 @@ public:
bool
operator()(String const& lhs, value_type const& rhs) const
{
if(lhs.size() < rhs.name_string().size())
return true;
if(lhs.size() > rhs.name_string().size())
return false;
return iless::operator()(lhs, rhs.name_string());
}
@ -112,6 +116,10 @@ public:
bool
operator()(value_type const& lhs, String const& rhs) const
{
if(lhs.name_string().size() < rhs.size())
return true;
if(lhs.name_string().size() > rhs.size())
return false;
return iless::operator()(lhs.name_string(), rhs);
}
@ -119,6 +127,10 @@ public:
bool
operator()(value_type const& lhs, value_type const& rhs) const
{
if(lhs.name_string().size() < rhs.name_string().size())
return true;
if(lhs.name_string().size() > rhs.name_string().size())
return false;
return iless::operator()(lhs.name_string(), rhs.name_string());
}
};