[DebugInfo] Avoid re-ordering assignments in LCSSA
[llvm-project.git] / libcxx / benchmarks / deque.bench.cpp
blob0025a335ccf253b18638689fd258e42b6c7d422f
1 // -*- C++ -*-
2 //===----------------------------------------------------------------------===//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
10 #include <deque>
12 #include "benchmark/benchmark.h"
14 #include "ContainerBenchmarks.h"
15 #include "GenerateInput.h"
17 using namespace ContainerBenchmarks;
19 constexpr std::size_t TestNumInputs = 1024;
21 BENCHMARK_CAPTURE(BM_ConstructSize,
22 deque_byte,
23 std::deque<unsigned char>{})->Arg(5140480);
25 BENCHMARK_CAPTURE(BM_ConstructSizeValue,
26 deque_byte,
27 std::deque<unsigned char>{}, 0)->Arg(5140480);
29 BENCHMARK_CAPTURE(BM_ConstructIterIter,
30 deque_char,
31 std::deque<char>{},
32 getRandomIntegerInputs<char>)->Arg(TestNumInputs);
34 BENCHMARK_CAPTURE(BM_ConstructIterIter,
35 deque_size_t,
36 std::deque<size_t>{},
37 getRandomIntegerInputs<size_t>)->Arg(TestNumInputs);
39 BENCHMARK_CAPTURE(BM_ConstructIterIter,
40 deque_string,
41 std::deque<std::string>{},
42 getRandomStringInputs)->Arg(TestNumInputs);
47 BENCHMARK_MAIN();