19static_assert(!std::is_trivially_default_constructible<nontrivial_t>::value,
20 "expected nontrivial_t to not be trivially constructible");
23static_assert(std::is_trivially_default_constructible<trivial_t>::value,
24 "expected trivial_t to be trivially constructible");
69 for (
auto x = 0; x < 900; ++x) {
73 for (
auto x = 0; x < 101; ++x) {
78 for (
auto x = 0; x < 1000; ++x) {
89 std::vector<prevector<28, T>> vec;
91 for (
size_t i = 0; i < 260; ++i) {
102 std::vector<prevector<28, T>> vec;
104 for (
size_t i = 0; i < 260; ++i) {
106 vec.emplace_back(29,
T{});
111#define PREVECTOR_TEST(name) \
112 static void Prevector##name##Nontrivial(benchmark::Bench& bench) \
114 Prevector##name<nontrivial_t>(bench); \
116 BENCHMARK(Prevector##name##Nontrivial, benchmark::PriorityLevel::HIGH); \
117 static void Prevector##name##Trivial(benchmark::Bench& bench) \
119 Prevector##name<trivial_t>(bench); \
121 BENCHMARK(Prevector##name##Trivial, benchmark::PriorityLevel::HIGH);
static void PrevectorFillVectorIndirect(benchmark::Bench &bench)
static void PrevectorResize(benchmark::Bench &bench)
static void PrevectorFillVectorDirect(benchmark::Bench &bench)
static void PrevectorDestructor(benchmark::Bench &bench)
static void PrevectorClear(benchmark::Bench &bench)
#define PREVECTOR_TEST(name)
static void PrevectorDeserialize(benchmark::Bench &bench)
Double ended buffer combining vector and stream-like interfaces.
Main entry point to nanobench's benchmarking facility.
Bench & run(char const *benchmarkName, Op &&op)
Repeatedly calls op() based on the configuration, and performs measurements.
Bench & batch(T b) noexcept
Sets the batch size.
Implements a drop-in replacement for std::vector<T> which stores up to N elements directly (without h...
void resize(size_type new_size)
#define T(expected, seed, data)
SERIALIZE_METHODS(nontrivial_t, obj)