summaryrefslogtreecommitdiffstats
path: root/libcxx/benchmarks/unordered_set_operations.bench.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/benchmarks/unordered_set_operations.bench.cpp')
-rw-r--r--libcxx/benchmarks/unordered_set_operations.bench.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/libcxx/benchmarks/unordered_set_operations.bench.cpp b/libcxx/benchmarks/unordered_set_operations.bench.cpp
index ab737c1ee7d..8c4463865d5 100644
--- a/libcxx/benchmarks/unordered_set_operations.bench.cpp
+++ b/libcxx/benchmarks/unordered_set_operations.bench.cpp
@@ -265,4 +265,42 @@ BENCHMARK_CAPTURE(BM_FindRehash,
std::unordered_set<std::string>{},
getRandomStringInputs)->Arg(TestNumInputs);
+///////////////////////////////////////////////////////////////////////////////
+BENCHMARK_CAPTURE(BM_InsertDuplicate,
+ unordered_set_int,
+ std::unordered_set<int>{},
+ getRandomIntegerInputs<int>)->Arg(TestNumInputs);
+BENCHMARK_CAPTURE(BM_InsertDuplicate,
+ unordered_set_string,
+ std::unordered_set<std::string>{},
+ getRandomStringInputs)->Arg(TestNumInputs);
+
+BENCHMARK_CAPTURE(BM_EmplaceDuplicate,
+ unordered_set_int,
+ std::unordered_set<int>{},
+ getRandomIntegerInputs<int>)->Arg(TestNumInputs);
+BENCHMARK_CAPTURE(BM_EmplaceDuplicate,
+ unordered_set_string,
+ std::unordered_set<std::string>{},
+ getRandomStringInputs)->Arg(TestNumInputs);
+
+BENCHMARK_CAPTURE(BM_InsertDuplicate,
+ unordered_set_int_insert_arg,
+ std::unordered_set<int>{},
+ getRandomIntegerInputs<int>)->Arg(TestNumInputs);
+BENCHMARK_CAPTURE(BM_InsertDuplicate,
+ unordered_set_string_insert_arg,
+ std::unordered_set<std::string>{},
+ getRandomStringInputs)->Arg(TestNumInputs);
+
+BENCHMARK_CAPTURE(BM_EmplaceDuplicate,
+ unordered_set_int_insert_arg,
+ std::unordered_set<int>{},
+ getRandomIntegerInputs<unsigned>)->Arg(TestNumInputs);
+
+BENCHMARK_CAPTURE(BM_EmplaceDuplicate,
+ unordered_set_string_arg,
+ std::unordered_set<std::string>{},
+ getRandomCStringInputs)->Arg(TestNumInputs);
+
BENCHMARK_MAIN()
OpenPOWER on IntegriCloud