> On Nov. 5, 2015, 1:29 p.m., Bernd Mathiske wrote: > > src/slave/containerizer/fetcher.cpp, line 276 > > <https://reviews.apache.org/r/39595/diff/1/?file=1104942#file1104942line276> > > > > An advanced compiler will figure out that this is a std::move just by > > itself (using escape analysis). No need to clutter the code with extra > > hints. In case current C+= compilers weren't this good yet, let's endure > > some minimal memory and runtime cost here for now :-) > > > > Readability first! std::move only when it is contributing something > > significant. > > Benjamin Bannier wrote: > AFAIK C++ compilers in contrast to some Java compiler do not usually > perform escape analysis. They could perform (N)RVO, but that wouldn't apply > here. > > Since `Try` has among other things a `std::string message` performing a > copy here would likely incur a sloow heap allocation which we do not need > (checked with trunk clang `-O2`). I wouldn't agree that the few `std::move` > clutter the code that much.
Remove all usages of `move` here and in RR-39594 since the consensus seems to be that it worsens readability beyond what we care about performance in this case. - Benjamin ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/39595/#review105232 ----------------------------------------------------------- On Nov. 6, 2015, 7:52 p.m., Benjamin Bannier wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/39595/ > ----------------------------------------------------------- > > (Updated Nov. 6, 2015, 7:52 p.m.) > > > Review request for mesos, Bernd Mathiske, Jan Schlicht, and Till Toenshoff. > > > Bugs: MESOS-3785 > https://issues.apache.org/jira/browse/MESOS-3785 > > > Repository: mesos > > > Description > ------- > > Also added function to query mtime of HDFS resource. > > > Diffs > ----- > > src/hdfs/hdfs.hpp 42c150186f2ce676407e4e00e84bd7e38063d9ba > src/slave/containerizer/fetcher.hpp > c7518a36f6344841880dbb11bfce603fd2791fc0 > src/slave/containerizer/fetcher.cpp > e0d02d5f8f4f6e930a2ae6abe365548af6d1b01f > src/tests/fetcher_cache_tests.cpp 0b3245105b4c1efae54f0bc34f672290819a6f0b > > Diff: https://reviews.apache.org/r/39595/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Benjamin Bannier > >
