summaryrefslogtreecommitdiffstats
path: root/libcxx/benchmarks/set_find.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/benchmarks/set_find.pass.cpp')
-rw-r--r--libcxx/benchmarks/set_find.pass.cpp29
1 files changed, 0 insertions, 29 deletions
diff --git a/libcxx/benchmarks/set_find.pass.cpp b/libcxx/benchmarks/set_find.pass.cpp
deleted file mode 100644
index 32f90266dcc..00000000000
--- a/libcxx/benchmarks/set_find.pass.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <unordered_set>
-#include <vector>
-#include <cstdint>
-
-#include "benchmark/benchmark_api.h"
-
-template <class IntT>
-std::vector<IntT> getInputs(size_t N) {
- std::vector<IntT> inputs;
- for (size_t i=0; i < N; ++i) {
- inputs.push_back(i);
- }
- return inputs;
-}
-
-template <class Container, class Inputs>
-void BM_SetLookup(benchmark::State& st, Container c, Inputs const& in) {
- c.insert(in.begin(), in.end());
- const auto end = in.end();
- while (st.KeepRunning()) {
- for (auto it = in.begin(); it != end; ++it) {
- benchmark::DoNotOptimize(c.find(*it++));
- }
- }
-}
-BENCHMARK_CAPTURE(BM_SetLookup, uint32_lookup,
- std::unordered_set<uint32_t>{}, getInputs<uint32_t>(1024));
-
-BENCHMARK_MAIN()
OpenPOWER on IntegriCloud