[libcxx-commits] [libcxx] [libc++] Rename bitset benchmark to be self-descriptive (PR #162139)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Mon Oct 6 12:18:31 PDT 2025


https://github.com/ldionne created https://github.com/llvm/llvm-project/pull/162139

It's important for the name of each benchmark to fully describe the benchmark since we aggregate the results of all benchmarks in a single .lnt file for analysis.

>From e02259a7f9a80347b52ca740a875233a41fb8dbf Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Mon, 6 Oct 2025 15:16:39 -0400
Subject: [PATCH] [libc++] Rename bitset benchmark to be self-descriptive

It's important for the name of each benchmark to fully describe
the benchmark since we aggregate the results of all benchmarks
in a single .lnt file for analysis.
---
 libcxx/test/benchmarks/bitset.bench.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libcxx/test/benchmarks/bitset.bench.cpp b/libcxx/test/benchmarks/bitset.bench.cpp
index 8fcf52e9425ce..b4c7e6feb6569 100644
--- a/libcxx/test/benchmarks/bitset.bench.cpp
+++ b/libcxx/test/benchmarks/bitset.bench.cpp
@@ -103,7 +103,7 @@ BENCHMARK(BM_BitsetToString<262144>)->Arg(50)->Name("BM_BitsetToString<262144>/U
 BENCHMARK(BM_BitsetToString<524288>)->Arg(50)->Name("BM_BitsetToString<524288>/Uniform (50%)");
 BENCHMARK(BM_BitsetToString<1048576>)->Arg(50)->Name("BM_BitsetToString<1048576>/Uniform (50%)"); // 1 << 20
 
-static void BM_ctor_ull(benchmark::State& state) {
+static void BM_Bitset_ctor_ull(benchmark::State& state) {
   unsigned long long val = (1ULL << state.range(0)) - 1;
   for (auto _ : state) {
     std::bitset<128> b(val);
@@ -111,6 +111,6 @@ static void BM_ctor_ull(benchmark::State& state) {
   }
 }
 
-BENCHMARK(BM_ctor_ull)->DenseRange(1, 63);
+BENCHMARK(BM_Bitset_ctor_ull)->DenseRange(1, 63);
 
 BENCHMARK_MAIN();



More information about the libcxx-commits mailing list