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

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jul 25 09:32:49 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>) {
----------------
ldionne wrote:

Do you really need a total order here? Since you don't seem to need that, it might make sense to keep `__less_tag`.

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


More information about the libcxx-commits mailing list