[libcxx-commits] [PATCH] D59705: Hot fix for equal algo
Mikhail Dvorskiy via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Mar 25 03:29:42 PDT 2019
MikeDvorskiy marked an inline comment as done.
MikeDvorskiy 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:
> > 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)
CHANGES SINCE LAST ACTION
More information about the libcxx-commits