[lld][WebAssembly] Reinstate mistakenly disabled test. NFC
[llvm-project.git] / libcxx / benchmarks / vector_operations.bench.cpp
blob70a317df9fb835ee21a59b352ada1a20a332498f
1 #include <vector>
2 #include <functional>
3 #include <cstdint>
4 #include <cstdlib>
5 #include <cstring>
7 #include "benchmark/benchmark.h"
9 #include "ContainerBenchmarks.h"
10 #include "GenerateInput.h"
12 using namespace ContainerBenchmarks;
14 constexpr std::size_t TestNumInputs = 1024;
16 BENCHMARK_CAPTURE(BM_ConstructSize,
17 vector_byte,
18 std::vector<unsigned char>{})->Arg(5140480);
20 BENCHMARK_CAPTURE(BM_ConstructSizeValue,
21 vector_byte,
22 std::vector<unsigned char>{}, 0)->Arg(5140480);
24 BENCHMARK_CAPTURE(BM_ConstructIterIter,
25 vector_char,
26 std::vector<char>{},
27 getRandomIntegerInputs<char>)->Arg(TestNumInputs);
29 BENCHMARK_CAPTURE(BM_ConstructIterIter,
30 vector_size_t,
31 std::vector<size_t>{},
32 getRandomIntegerInputs<size_t>)->Arg(TestNumInputs);
34 BENCHMARK_CAPTURE(BM_ConstructIterIter,
35 vector_string,
36 std::vector<std::string>{},
37 getRandomStringInputs)->Arg(TestNumInputs);
40 BENCHMARK_MAIN();