> On Sept. 9, 2015, 3:46 p.m., Alexander Rukletsov wrote:
> > src/common/values.cpp, lines 250-271
> > <https://reviews.apache.org/r/38158/diff/5/?file=1065425#file1065425line250>
> >
> >     I think we can conflate this two cases, how about this:
> >     ```
> >     if (range->end() + 1 >= current.begin()) {
> >       range->set_end(std::max(range.end(), current.end()));
> >       deleteSet.insert(y);
> >       ++i;
> >     } else {
> >       break;
> >     }
> >     ```
> 
> Joerg Schad wrote:
>     Yes we could do this. I personally find the 2 distinct cases (especially 
> with the range comments) more readable.
> 
> Alexander Rukletsov wrote:
>     I think we can also add range comments here to make it more readable : ). 
> Usually less branches and less code means faster execution. However, you (and 
> your shepherd) decide, means you can drop the issue.

refactored


- Joerg


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/38158/#review98200
-----------------------------------------------------------


On Sept. 23, 2015, 12:37 p.m., Joerg Schad wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38158/
> -----------------------------------------------------------
> 
> (Updated Sept. 23, 2015, 12:37 p.m.)
> 
> 
> Review request for mesos, Bernd Mathiske, Joris Van Remoortere, 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
> -----
> 
>   src/common/values.cpp 750264e603b4cde2011f07f4434a4b34fe3e512f 
>   src/tests/resources_tests.cpp 0318885336409f7cc9dbd4a3daa9b52db197bbd1 
>   src/tests/values_tests.cpp fc35d97894a2de6207b9337180e2160e6f2cb1f5 
> 
> Diff: https://reviews.apache.org/r/38158/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Joerg Schad
> 
>

Reply via email to