----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/49246/#review140554 -----------------------------------------------------------
3rdparty/stout/include/stout/strings.hpp (lines 370 - 374) <https://reviews.apache.org/r/49246/#comment205972> I think it would be more efficient and readable to use `std::equal`. ``` return s.size() >= prefix.size() && std::equal(prefix.begin(), prefix.end(), s.begin()); ``` 3rdparty/stout/include/stout/strings.hpp (lines 386 - 390) <https://reviews.apache.org/r/49246/#comment205973> ``` return s.size() >= suffix.size() && std::equal(suffix.rbegin(), suffix.rend(), s.rbegin()); ``` - Michael Park On June 27, 2016, 6:16 a.m., Klaus Ma wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/49246/ > ----------------------------------------------------------- > > (Updated June 27, 2016, 6:16 a.m.) > > > Review request for mesos and Michael Park. > > > Bugs: MESOS-5715 > https://issues.apache.org/jira/browse/MESOS-5715 > > > Repository: mesos > > > Description > ------- > > Enhanced startsWith/endsWith's performance. > > > Diffs > ----- > > 3rdparty/stout/include/stout/strings.hpp > 162bdfb6c4f5a6b108761ebccd9b77e672f6dd87 > > Diff: https://reviews.apache.org/r/49246/diff/ > > > Testing > ------- > > make && make check > > > Thanks, > > Klaus Ma > >
