Raven Core
3.0.0
P2P Digital Currency
Main Page
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
z
+
Functions
b
c
d
f
g
h
i
m
o
p
q
s
v
Variables
Typedefs
Enumerations
Enumerator
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
f
i
k
l
m
o
p
r
s
t
v
+
Enumerations
b
c
d
e
f
m
n
o
r
s
t
u
v
w
+
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Properties
+
Related Functions
a
c
d
f
o
p
t
u
v
w
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
+
Variables
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
v
w
z
+
Typedefs
b
c
h
i
k
m
n
r
s
t
u
v
w
+
Enumerations
a
b
c
d
e
f
g
h
i
j
m
n
o
q
r
s
t
w
+
Enumerator
a
b
c
d
e
f
g
h
i
j
l
m
n
o
r
s
t
u
+
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
src
bench
prevector_destructor.cpp
Go to the documentation of this file.
1
// Copyright (c) 2015-2017 The Bitcoin Core developers
2
// Copyright (c) 2017-2019 The Raven Core developers
3
// Distributed under the MIT software license, see the accompanying
4
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
6
#include "
bench.h
"
7
#include "
prevector.h
"
8
9
static
void
PrevectorDestructor(
benchmark::State
& state)
10
{
11
while
(state.
KeepRunning
()) {
12
for
(
auto
x = 0; x < 1000; ++x) {
13
prevector<28, unsigned char>
t0;
14
prevector<28, unsigned char>
t1;
15
t0.
resize
(28);
16
t1.
resize
(29);
17
}
18
}
19
}
20
21
static
void
PrevectorClear(
benchmark::State
& state)
22
{
23
24
while
(state.
KeepRunning
()) {
25
for
(
auto
x = 0; x < 1000; ++x) {
26
prevector<28, unsigned char>
t0;
27
prevector<28, unsigned char>
t1;
28
t0.
resize
(28);
29
t0.
clear
();
30
t1.
resize
(29);
31
t0.
clear
();
32
}
33
}
34
}
35
36
BENCHMARK
(PrevectorDestructor);
37
BENCHMARK
(PrevectorClear);
prevector::resize
void resize(size_type new_size)
Definition:
prevector.h:317
prevector::clear
void clear()
Definition:
prevector.h:340
prevector.h
benchmark::State::KeepRunning
bool KeepRunning()
Definition:
bench.cpp:44
prevector
Implements a drop-in replacement for std::vector<T> which stores up to N elements directly (without h...
Definition:
prevector.h:37
bench.h
BENCHMARK
BENCHMARK(PrevectorDestructor)
benchmark::State
Definition:
bench.h:41
Generated on Mon Jul 29 2019 02:32:17 for Raven Core by
1.8.13