> On Sept. 7, 2015, 9:24 p.m., Alexander Rukletsov wrote: > > src/common/values.cpp, lines 277-278 > > <https://reviews.apache.org/r/38158/diff/2/?file=1064869#file1064869line277> > > > > Since you're editing here, mind explaining what an "urange" is?
As the comment above states it is an Un-coalesced range, will try to highlight that more. > On Sept. 7, 2015, 9:24 p.m., Alexander Rukletsov wrote: > > src/common/values.cpp, line 665 > > <https://reviews.apache.org/r/38158/diff/2/?file=1064869#file1064869line665> > > > > Just to make sure, you have added just `2` lines to this function (not > > easy on RB): > > ``` > > sort(ranges); > > coalesce(ranges); > > ``` > > Correct? And removed one temporary Ranges object (see line 72 in previous version). > On Sept. 7, 2015, 9:24 p.m., Alexander Rukletsov wrote: > > src/common/values.cpp, lines 442-444 > > <https://reviews.apache.org/r/38158/diff/2/?file=1064869#file1064869line442> > > > > Let's let compiler do it's job: how about passing `left` by value and > > not creating a copy manually? Wanted to keep the (internal) interface consistent with the other operators. Do you have a strong preference here? > On Sept. 7, 2015, 9:24 p.m., Alexander Rukletsov wrote: > > src/common/values.cpp, lines 185-186 > > <https://reviews.apache.org/r/38158/diff/2/?file=1064869#file1064869line185> > > > > s/is/are > > > > I would suggest we write high level comments. How about this: "We > > assume ranges are sorted in ascending order of the lower endpoint." ranges is the Ranges object i.e. is, and otherwise I personally find range.begin() a more precise description.... - Joerg ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/38158/#review97937 ----------------------------------------------------------- On Sept. 7, 2015, 6:04 p.m., Joerg Schad wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/38158/ > ----------------------------------------------------------- > > (Updated Sept. 7, 2015, 6:04 p.m.) > > > Review request for mesos, Bernd Mathiske and Till Toenshoff. > > > Bugs: MESOS-3051 > https://issues.apache.org/jira/browse/MESOS-3051 > > > Repository: mesos > > > Description > ------- > > The goal of this refactoring was to reuse the Ranges objects as much as > possible, as prior there was substantial time spend in allocation/destruction > (MESOS-3051). > > > Diffs > ----- > > include/mesos/values.hpp e300580431f7fd6cff06e9617c0227b51c4cb8e2 > src/common/values.cpp 750264e603b4cde2011f07f4434a4b34fe3e512f > src/tests/resources_tests.cpp 2ae93a9c8235e5e4643539d409df51c39c6d7e56 > src/tests/values_tests.cpp fc35d97894a2de6207b9337180e2160e6f2cb1f5 > > Diff: https://reviews.apache.org/r/38158/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Joerg Schad > >