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

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jul 22 01:22:05 PDT 2026


Author: Nikolas Klauser
Date: 2026-07-22T10:22:00+02:00
New Revision: c23ad1b869cdcec16275304e1f0b1d419fe35ae9

URL: https://github.com/llvm/llvm-project/commit/c23ad1b869cdcec16275304e1f0b1d419fe35ae9
DIFF: https://github.com/llvm/llvm-project/commit/c23ad1b869cdcec16275304e1f0b1d419fe35ae9.diff

LOG: [libc++] Remove {Pause,Resume}Timing from fast push_back benchmarks (#209130)

These benchmarks are expected to run for a very short time, and
`{Pause,Resume}Timing` should only be used when operations are expected
to take a long time. Removing them reduces the amount of noise in these
benchmarks.

Fixes #208719

Added: 
    

Modified: 
    libcxx/test/benchmarks/containers/sequence/sequence_container_benchmarks.h

Removed: 
    


################################################################################
diff  --git a/libcxx/test/benchmarks/containers/sequence/sequence_container_benchmarks.h b/libcxx/test/benchmarks/containers/sequence/sequence_container_benchmarks.h
index 92346c38563fb..729f587c3388b 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();
           }
         });
     }
@@ -396,7 +394,7 @@ void sequence_container_benchmarks(std::string container) {
           DoNotOptimizeData(c);
 
           st.PauseTiming();
-          c.clear();
+          c = Container();
           st.ResumeTiming();
         }
       });


        


More information about the libcxx-commits mailing list