[ 
https://issues.apache.org/jira/browse/MESOS-4561?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15124918#comment-15124918
 ] 

haosdent edited comment on MESOS-4561 at 1/30/16 3:00 PM:
----------------------------------------------------------

So we should use std::string::compare in role validation?


was (Author: haosd...@gmail.com):
So we should use compare in role validation?

> 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
>              Labels: mesosphere
>
> [~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