
This patch does not significantly change how the sequence container benchmarks are done, but it adopts the same style as the associative container benchmarks. This commit does adjust how we were benchmarking push_back, where we never really measured the overhead of the slow path of push_back (when we need to reallocate).
26 lines
850 B
C++
26 lines
850 B
C++
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
|
|
|
#include <deque>
|
|
#include <string>
|
|
|
|
#include "sequence_container_benchmarks.h"
|
|
#include "benchmark/benchmark.h"
|
|
|
|
int main(int argc, char** argv) {
|
|
support::sequence_container_benchmarks<std::deque<int>>("std::deque<int>");
|
|
support::sequence_container_benchmarks<std::deque<std::string>>("std::deque<std::string>");
|
|
|
|
benchmark::Initialize(&argc, argv);
|
|
benchmark::RunSpecifiedBenchmarks();
|
|
benchmark::Shutdown();
|
|
return 0;
|
|
}
|