[libcxx-commits] [PATCH] D127557: [libc++][ranges] Implement `ranges::sort`.
Konstantin Varlamov via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jun 14 23:00:02 PDT 2022
var-const added inline comments.
================
Comment at: libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/ranges.sort.pass.cpp:201
+ }
+ }
+
----------------
Mordante wrote:
> Please add a test for the complexity.
`sort` doesn't perform a well-defined number of operations. Do you mean a test that checks that the number of comparisons is less than `N log(N)`? I'm not sure it's meaningful for a small `N`. Do we have any precedent for that? I don't see this being tested for the non-ranges version of `sort`. There are some complexity tests for the ranges algorithms, but all those that I remember were linear.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127557/new/
https://reviews.llvm.org/D127557
More information about the libcxx-commits
mailing list