[libcxx-commits] [libcxx] [libc++] Remove some std::minmax_element benchmarks (PR #210272)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jul 17 01:24:46 PDT 2026


https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/210272

There isn't much value in benchmarking lots of similar sizes. We can remove them to improve the time it takes to run the benchmarks.


>From 47a72fbee4501fb6ae7cfa946b751ed0903799e1 Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Fri, 17 Jul 2026 10:23:48 +0200
Subject: [PATCH] [libc++] Remove some std::minmax_element benchmarks

---
 .../algorithms/min_max_element.bench.cpp         | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/libcxx/test/benchmarks/algorithms/min_max_element.bench.cpp b/libcxx/test/benchmarks/algorithms/min_max_element.bench.cpp
index 67a52f5d7a80a..2ad03b0ed4472 100644
--- a/libcxx/test/benchmarks/algorithms/min_max_element.bench.cpp
+++ b/libcxx/test/benchmarks/algorithms/min_max_element.bench.cpp
@@ -13,21 +13,7 @@
 
 #include <benchmark/benchmark.h>
 
-void run_sizes(benchmark::Benchmark* benchmark) {
-  benchmark->Arg(1)
-      ->Arg(2)
-      ->Arg(3)
-      ->Arg(4)
-      ->Arg(64)
-      ->Arg(512)
-      ->Arg(1024)
-      ->Arg(4000)
-      ->Arg(4096)
-      ->Arg(5500)
-      ->Arg(64000)
-      ->Arg(65536)
-      ->Arg(70000);
-}
+void run_sizes(benchmark::Benchmark* benchmark) { benchmark->Arg(2)->Arg(5500)->Arg(70000); }
 
 template <class T>
 void BM_std_minmax_element(benchmark::State& state) {



More information about the libcxx-commits mailing list