[libcxx-commits] [libcxx] [libc++] Optimize lexicographical_compare (PR #65279)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jul 27 05:06:58 PDT 2024


================
@@ -89,7 +89,7 @@ struct __fn {
     // vectorize the code.
     if constexpr (contiguous_range<_Range> && is_integral_v<_ValueT> &&
                   __is_cheap_to_copy<_ValueT> & __is_identity<_Proj>::value &&
-                  __desugars_to_v<__less_tag, _Comp, _ValueT, _ValueT>) {
+                  __desugars_to_v<__totally_ordered_less_tag, _Comp, _ValueT, _ValueT>) {
----------------
philnik777 wrote:

Since we have the much stricter requirement that `_ValueT` has to be integral here, I'm not sure it makes a ton of sense to have different tags for this. I'm not aware of any other place where we would want to use `__less_tag` instead of `__totally_ordered_less_tag`.

https://github.com/llvm/llvm-project/pull/65279


More information about the libcxx-commits mailing list