Michael Park created MESOS-4561:
-----------------------------------

             Summary: Investigate `std::string` to C string comparison.
                 Key: MESOS-4561
                 URL: https://issues.apache.org/jira/browse/MESOS-4561
             Project: Mesos
          Issue Type: Bug
            Reporter: Michael Park


[~jvanremoortere] identified a large performance bottleneck in role validation 
logic and submitted a 
[fix|https://github.com/apache/mesos/commit/5e618ac2197e856f09511850bebe51fea71c1844]
 for the 0.27.0 release.

However, templated versions of {{bool operator==(const std::string&, const char 
\*)}} and {{bool operator==(const char\*, const std::string&)}} are part of the 
standard library 
http://en.cppreference.com/w/cpp/string/basic_string/operator_cmp, and 
therefore should not have triggered temporary string constructions.

The first thought was perhaps they don't happen to be implemented in 
{{libstdc++}}, but having looked at its implementation, I was able to find the 
definitions of these operators.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to