|
Bitcoin Core
22.99.0
P2P Digital Currency
|
Go to the documentation of this file.
17 static_assert(!std::is_trivially_default_constructible<nontrivial_t>::value,
18 "expected nontrivial_t to not be trivially constructible");
21 static_assert(std::is_trivially_default_constructible<trivial_t>::value,
22 "expected trivial_t to be trivially constructible");
67 for (
auto x = 0; x < 900; ++x) {
71 for (
auto x = 0; x < 101; ++x) {
76 for (
auto x = 0; x < 1000; ++x) {
83 #define PREVECTOR_TEST(name) \
84 static void Prevector##name##Nontrivial(benchmark::Bench& bench) \
86 Prevector##name<nontrivial_t>(bench); \
88 BENCHMARK(Prevector##name##Nontrivial); \
89 static void Prevector##name##Trivial(benchmark::Bench& bench) \
91 Prevector##name<trivial_t>(bench); \
93 BENCHMARK(Prevector##name##Trivial);
ANKERL_NANOBENCH(NODISCARD) std Bench & batch(T b) noexcept
Sets the batch size.
Main entry point to nanobench's benchmarking facility.
static void PrevectorResize(benchmark::Bench &bench)
Bench & run(char const *benchmarkName, Op &&op)
Repeatedly calls op() based on the configuration, and performs measurements.
bool Rewind(std::optional< size_type > n=std::nullopt)
SERIALIZE_METHODS(nontrivial_t, obj)
void resize(size_type new_size)
Implements a drop-in replacement for std::vector<T> which stores up to N elements directly (without h...
Double ended buffer combining vector and stream-like interfaces.
static void PrevectorDestructor(benchmark::Bench &bench)
static void PrevectorClear(benchmark::Bench &bench)
#define PREVECTOR_TEST(name)
static void PrevectorDeserialize(benchmark::Bench &bench)