> On Aug. 24, 2020, 9:30 p.m., Benjamin Mahler wrote: > > src/master/allocator/mesos/offer_constraints_filter.cpp > > Lines 113-119 (patched) > > <https://reviews.apache.org/r/72786/diff/5/?file=2238651#file2238651line113> > > > > How did you figure this out? Just from your own testing? > > > > What about with clang? Same result? > > > > How much faster? Is it worth bothering? > > Andrei Sekretenko wrote: > Around 10% of the allocation loop time in a rather pecualr, although not > exotic, situation: a fast regexp that filters out most of the agents. > Probably not worth bothering until we have a well-parametrized benchmark. > > Maybe instead I should figure out if -O3 (which is the default in ther > Makefile, as opposed to cMake with RelWithDebInfo, which by defautl uses -O2) > can get us rid of this buffer zeroing: > https://github.com/google/re2/blob/ca11026a032ce2a3de4b3c389ee53d2bdc8794d6/re2/re2.cc#L907 > in the case of FullMatch. > > If it does, it might be worth making the CMake build less consistent > internally but more consistent with the "standard" build flags of RE2.
Hmm.. now I don't see such a large effect with the draft benchmark I have at hand; either I've lost the version that was exhibiting that 10% difference or that was a measurement error. Tried -O3, that doesn't help to optimize out that `memset` in `RE2::DoMatch()`. Dropped this wrapper. > On Aug. 24, 2020, 9:30 p.m., Benjamin Mahler wrote: > > src/master/constants.hpp > > Lines 182 (patched) > > <https://reviews.apache.org/r/72786/diff/5/?file=2238652#file2238652line182> > > > > regular > > > > Anything you can add about how these numbers were produced? Would be > > helpful. Added an example regex similar to what we saw in some of the real-world Marathon apps and extracted the minimum max_mem under which it constructs successfully. - Andrei ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/72786/#review221697 ----------------------------------------------------------- On Aug. 25, 2020, 6:43 p.m., Andrei Sekretenko wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/72786/ > ----------------------------------------------------------- > > (Updated Aug. 25, 2020, 6:43 p.m.) > > > Review request for mesos and Benjamin Mahler. > > > Bugs: MESOS-10173 > https://issues.apache.org/jira/browse/MESOS-10173 > > > Repository: mesos > > > Description > ------- > > Implemented regex-based offer constraints. > > > Diffs > ----- > > include/mesos/allocator/allocator.hpp > 05d0e9c46485c3048a65d46747d56e715883a0b3 > src/Makefile.am 8b95611baff2f925910ea46addf462cf9f33071b > src/master/allocator/mesos/offer_constraints_filter.hpp PRE-CREATION > src/master/allocator/mesos/offer_constraints_filter.cpp > d724fd0a9832feea26f6db1a498b6bdee83ffff0 > src/master/constants.hpp c384b6878193a4b6bb09294d8b14757906595c1b > src/master/flags.hpp 78623d68bf428cd3f52684303d98a525d42eb878 > src/master/flags.cpp 74f4daadd48e8e691be43759b88dc8b3c2df489a > src/master/master.hpp e478f805069813532011f2a1991ab1f847080516 > src/master/master.cpp 4428985902512eea1c97205f04a4fed6c16d494e > src/tests/master/offer_constraints_filter_tests.cpp > 84a1e917a52d0b98f979e454c2b982c6402b0176 > > > Diff: https://reviews.apache.org/r/72786/diff/6/ > > > Testing > ------- > > > Thanks, > > Andrei Sekretenko > >
