MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / PrevectorDeserialize

Function PrevectorDeserialize

src/bench/prevector.cpp:71–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69
70template <typename T>
71static void PrevectorDeserialize(benchmark::State& state)
72{
73 CDataStream s0(SER_NETWORK, 0);
74 prevector<28, T> t0;
75 t0.resize(28);
76 for (auto x = 0; x < 900; ++x) {
77 s0 << t0;
78 }
79 t0.resize(100);
80 for (auto x = 0; x < 101; ++x) {
81 s0 << t0;
82 }
83 while (state.KeepRunning()) {
84 prevector<28, T> t1;
85 for (auto x = 0; x < 1000; ++x) {
86 s0 >> t1;
87 }
88 s0.Init(SER_NETWORK, 0);
89 }
90}
91
92#define PREVECTOR_TEST(name, nontrivops, trivops) \
93 static void Prevector ## name ## Nontrivial(benchmark::State& state) { \

Callers

nothing calls this directly

Calls 3

KeepRunningMethod · 0.80
resizeMethod · 0.45
InitMethod · 0.45

Tested by

no test coverage detected