[libcxx-commits] [libcxx] [libc++] [sort] Improve performance of std::sort (PR #76616)
Daniel Kutenin via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jan 16 04:59:35 PST 2024
================
@@ -68,8 +68,7 @@ void test_same() {
auto snapshot_custom_v = v;
std::sort(v.begin(), v.end());
std::sort(snapshot_v.begin(), snapshot_v.end());
- std::sort(snapshot_custom_v.begin(), snapshot_custom_v.end(),
- [](const EqualType&, const EqualType&) { return false; });
----------------
danlark1 wrote:
`return false;` imposes a perfectly correct strict weak ordering comparator
https://github.com/llvm/llvm-project/pull/76616
More information about the libcxx-commits
mailing list