[libcxx-commits] [PATCH] D144538: Checked that complexity of std::sort_heap is 2N log(N) comparisons
Nilay Vaish via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Mar 6 06:17:05 PST 2023
nilayvaish added inline comments.
================
Comment at: libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/complexity.pass.cpp:63-66
+ // The exact stats of our current implementation are recorded here.
+ // If something changes to make them go a bit up or down, that's probably
+ // fine, and we can just update this test.
+ // But if they suddenly leap upward, that's a bad thing.
----------------
philnik wrote:
> This comments seems to be wrong now. Same in the ranges test.
Dropped lines 64-66 here and in the ranges test.
================
Comment at: libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/complexity.pass.cpp:75
+ LIBCPP_ASSERT(std::is_sorted(first, last));
+ }
return 0;
----------------
philnik wrote:
> Also for the ranges code.
Added assert here and in the ranges test.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144538/new/
https://reviews.llvm.org/D144538
More information about the libcxx-commits
mailing list