[libcxx-commits] [PATCH] D59705: Hot fix for equal algo
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Mar 25 05:39:13 PDT 2019
ldionne added inline comments.
Comment at: include/pstl/internal/glue_algorithm_impl.h:739
- //TODO: to get rid of "distance"
- if (std::distance(__first1, __last1) == std::distance(__first2, __last2))
> ldionne wrote:
> > ldionne wrote:
> > > Please restore the space here.
> > Why are you removing the TODO?
> "Distance check" is a kind of optimization for random access iterators..
> But for forward iterators it is a kind of overhead.. and we should keep TODO complete the fixing.
> Furthermore, I've just noticed, in case of size equal, we call a serial version std::equal(__first1, __last1, __first2, __p);
> Ok, I'll complete the fixing and update the patch.
> (and extend the test coverage as well)
Please fix this in a separate patch (I've already applied this one).
CHANGES SINCE LAST ACTION
More information about the libcxx-commits