> On May 3, 2018, 9:35 p.m., Benjamin Mahler wrote: > > 3rdparty/stout/include/stout/strings.hpp > > Lines 390 (patched) > > <https://reviews.apache.org/r/63367/diff/6/?file=2015957#file2015957line390> > > > > Can you mention the max length optimization you're doing?
I will add a comment if you think it is non-obvious, but intuitively I would have said that this is no more complicated than the other algorithms in this file? > On May 3, 2018, 9:35 p.m., Benjamin Mahler wrote: > > 3rdparty/stout/include/stout/strings.hpp > > Lines 411-413 (patched) > > <https://reviews.apache.org/r/63367/diff/6/?file=2015957#file2015957line411> > > > > Any reason not to do the same max len optimization here? There was, but as I was typing this reply I realized it not actually valid, so I'll update the review to add it as well. - Benno ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/63367/#review202383 ----------------------------------------------------------- On May 8, 2018, 12:30 p.m., Benno Evers wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/63367/ > ----------------------------------------------------------- > > (Updated May 8, 2018, 12:30 p.m.) > > > Review request for mesos, Alexander Rukletsov and Benjamin Mahler. > > > Repository: mesos > > > Description > ------- > > This saves an unnecessary memory allocation when > testing if a string starts or ends with a string literal, > which accounts for almost all usages of these functions > in Mesos and in libprocess. > > > Diffs > ----- > > 3rdparty/stout/include/stout/strings.hpp > 067a7923c02342bccd9be1136a981fd6b0e0e9b4 > 3rdparty/stout/tests/strings_tests.cpp > 395540aad88c76a66a43a54edfe9ca1a2d46d3b4 > > > Diff: https://reviews.apache.org/r/63367/diff/7/ > > > Testing > ------- > > > Thanks, > > Benno Evers > >