[libcxx-commits] [libcxx] [libc++][ranges] optimize the performance of `ranges::starts_with` (PR #84570)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Apr 26 09:56:45 PDT 2024
================
@@ -50,14 +54,36 @@ struct __fn {
_Pred __pred = {},
_Proj1 __proj1 = {},
_Proj2 __proj2 = {}) {
- return __mismatch::__fn::__go(
+ if constexpr (sized_sentinel_for<_Sent1, _Iter1> && sized_sentinel_for<_Sent2, _Iter2>) {
----------------
ldionne wrote:
Great, thanks! We don't have a code coverage generator right now. I think it's kinda tricky to do right with template instantiations but it could be worthwhile to have something that works well, if that's possible.
https://github.com/llvm/llvm-project/pull/84570
More information about the libcxx-commits
mailing list