[libcxx-commits] [libcxx] Optimize vector::assign for InputIterator-only pair inputs (PR #113852)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Nov 28 08:36:28 PST 2024
================
@@ -69,4 +69,17 @@ BENCHMARK(bm_grow<std::string>);
BENCHMARK(bm_grow<std::unique_ptr<int>>);
BENCHMARK(bm_grow<std::deque<int>>);
+BENCHMARK_CAPTURE(BM_AssignInputIterIter, vector_int, std::vector<int>{}, getRandomIntegerInputs<int>)
+ ->Args({TestNumInputs, TestNumInputs});
+
+BENCHMARK_CAPTURE(
+ BM_AssignInputIterIter<32>, vector_string, std::vector<std::string>{}, getRandomStringInputsWithLength)
+ ->Args({TestNumInputs, TestNumInputs});
+
+BENCHMARK_CAPTURE(BM_AssignInputIterIter<100>,
----------------
ldionne wrote:
Thanks for the explanation!
https://github.com/llvm/llvm-project/pull/113852
More information about the libcxx-commits
mailing list