Skip to content

Commit ef44e46

Browse files
committed
Revert "[libc++] Simplify the implementation of std::sort a bit (llvm#104902)"
This reverts commit d4ffccf, which caused a performance regression that needs to be investigated further.
1 parent c320df4 commit ef44e46

File tree

8 files changed

+171
-150
lines changed

8 files changed

+171
-150
lines changed

libcxx/include/__algorithm/comp.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ struct __less<void, void> {
4242
}
4343
};
4444

45-
template <class _Tp>
46-
inline const bool __desugars_to_v<__less_tag, __less<>, _Tp, _Tp> = true;
47-
4845
template <class _Tp>
4946
inline const bool __desugars_to_v<__totally_ordered_less_tag, __less<>, _Tp, _Tp> = is_integral<_Tp>::value;
5047

libcxx/include/__algorithm/ranges_minmax.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ struct __minmax {
8989
// vectorize the code.
9090
if constexpr (contiguous_range<_Range> && is_integral_v<_ValueT> &&
9191
__is_cheap_to_copy<_ValueT> & __is_identity<_Proj>::value &&
92-
__desugars_to_v<__less_tag, _Comp, _ValueT, _ValueT>) {
92+
__desugars_to_v<__totally_ordered_less_tag, _Comp, _ValueT, _ValueT>) {
9393
minmax_result<_ValueT> __result = {__r[0], __r[0]};
9494
for (auto __e : __r) {
9595
if (__e < __result.min)

0 commit comments

Comments
 (0)