[libcxx-commits] [libcxx] Libcxx nth element small ranges (PR #215698)
Adib Pathan via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Aug 12 22:08:59 PDT 2026
================
@@ -84,6 +84,55 @@ int main(int argc, char** argv) {
register_bm(support::single_element_data<int>, "repeated");
}
+ // Benchmark std::nth_element on many independent fixed-size windows. This models
+ // the median-of-3 / median-of-5 filter use case from #214238, where the window
+ // size is a compile-time constant and the specialized sorting-network path is
+ // expected to constant-fold away the general algorithm.
----------------
adxb-pxthxn wrote:
Sorted, I will keep this in mind from now on.
https://github.com/llvm/llvm-project/pull/215698
More information about the libcxx-commits
mailing list