[libcxx-commits] [libcxx] [libc++] Remove {Pause, Resume}Timing from fast push_back benchmarks (PR #209130)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jul 15 04:30:14 PDT 2026


https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/209130

>From 61ddf4edc43c1f20f5637e31c1416cb61db04438 Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Mon, 13 Jul 2026 12:05:58 +0200
Subject: [PATCH] [libc++] Remove {Pause,Resume}Timing from fast push_back
 benchmarks

---
 .../containers/sequence/sequence_container_benchmarks.h        | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libcxx/test/benchmarks/containers/sequence/sequence_container_benchmarks.h b/libcxx/test/benchmarks/containers/sequence/sequence_container_benchmarks.h
index 92346c38563fb..00c2e0b01eba4 100644
--- a/libcxx/test/benchmarks/containers/sequence/sequence_container_benchmarks.h
+++ b/libcxx/test/benchmarks/containers/sequence/sequence_container_benchmarks.h
@@ -372,9 +372,7 @@ void sequence_container_benchmarks(std::string container) {
             }
             DoNotOptimizeData(c);
 
-            st.PauseTiming();
             c.erase(c.end() - BatchSize, c.end());
-            st.ResumeTiming();
           }
         });
     }
@@ -397,6 +395,7 @@ void sequence_container_benchmarks(std::string container) {
 
           st.PauseTiming();
           c.clear();
+          c = Container();
           st.ResumeTiming();
         }
       });



More information about the libcxx-commits mailing list