aboutsummaryrefslogtreecommitdiff
path: root/src/bench/prevector_destructor.cpp
diff options
context:
space:
mode:
authorEvan Klitzke <evan@eklitzke.org>2018-02-26 18:45:57 -0800
committerEvan Klitzke <evan@eklitzke.org>2018-02-27 11:42:06 -0800
commitf0e7aa702095b22ba57a763c5c093e15d41586d1 (patch)
treee9acd6a0af2ab274264d5b2191984a9992c5b712 /src/bench/prevector_destructor.cpp
parent228b086b9a3de02b534474027353a80dead2c292 (diff)
Add new prevector benchmarks.
This prepares for a series of two additional commits which optimize prevector performance.
Diffstat (limited to 'src/bench/prevector_destructor.cpp')
-rw-r--r--src/bench/prevector_destructor.cpp36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/bench/prevector_destructor.cpp b/src/bench/prevector_destructor.cpp
deleted file mode 100644
index 39d0ee5eb1..0000000000
--- a/src/bench/prevector_destructor.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2015-2017 The Bitcoin Core developers
-// Distributed under the MIT software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-#include <bench/bench.h>
-#include <prevector.h>
-
-static void PrevectorDestructor(benchmark::State& state)
-{
- while (state.KeepRunning()) {
- for (auto x = 0; x < 1000; ++x) {
- prevector<28, unsigned char> t0;
- prevector<28, unsigned char> t1;
- t0.resize(28);
- t1.resize(29);
- }
- }
-}
-
-static void PrevectorClear(benchmark::State& state)
-{
-
- while (state.KeepRunning()) {
- for (auto x = 0; x < 1000; ++x) {
- prevector<28, unsigned char> t0;
- prevector<28, unsigned char> t1;
- t0.resize(28);
- t0.clear();
- t1.resize(29);
- t0.clear();
- }
- }
-}
-
-BENCHMARK(PrevectorDestructor, 5700);
-BENCHMARK(PrevectorClear, 5600);