> On June 27, 2016, 4:25 p.m., Neil Conway wrote: > > Can you provide some benchmarks to validate whether these changes improve > > performance, and for what kinds of inputs? (e.g., short vs. long strings, > > found match vs. no-match-found).
@neil, thanks for your comments; benchmarks maybe not necessary for this case: 1. In `startsWith`, `find` will try to find the first position of `prefix`, for example: s is "aab", prefix is "b", `find` will return 2; the performance improvement dependent on the length of `s`. 2. In `endsWith`, similar cases with `startsWith`. - Klaus ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/49246/#review139536 ----------------------------------------------------------- On June 27, 2016, 2:16 p.m., Klaus Ma wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/49246/ > ----------------------------------------------------------- > > (Updated June 27, 2016, 2:16 p.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 > >