File tree 2 files changed +27
-0
lines changed
2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ bench_bench_bitcoin_SOURCES = \
32
32
bench/duplicate_inputs.cpp \
33
33
bench/ellswift.cpp \
34
34
bench/examples.cpp \
35
+ bench/feefrac_mul.cpp \
35
36
bench/gcs_filter.cpp \
36
37
bench/hashpadding.cpp \
37
38
bench/index_blockfilter.cpp \
Original file line number Diff line number Diff line change
1
+ // Copyright (c) 2024-present The Bitcoin Core developers
2
+ // Distributed under the MIT software license, see the accompanying
3
+ // file COPYING or https://www.opensource.org/licenses/mit-license.php.
4
+
5
+ #include < bench/bench.h>
6
+ #include < random.h>
7
+ #include < util/feefrac.h>
8
+
9
+ #include < bit>
10
+ #include < cstdint>
11
+
12
+ static void FeefracMultipication (benchmark::Bench& bench)
13
+ {
14
+ FastRandomContext rnd;
15
+ uint64_t a64 = rnd.rand64 ();
16
+ uint32_t b32 = rnd.rand32 ();
17
+ uint64_t c64 = rnd.rand64 ();
18
+ uint32_t d32 = rnd.rand32 ();
19
+ bench.minEpochIterations (10000000 ).run ([&] {
20
+ FeeRateCompare (
21
+ FeeFrac (std::bit_cast<std::int64_t >(a64++), std::bit_cast<std::int32_t >(b32++)),
22
+ FeeFrac (std::bit_cast<std::int64_t >(c64++), std::bit_cast<std::int32_t >(d32++)));
23
+ });
24
+ }
25
+
26
+ BENCHMARK (FeefracMultipication, benchmark::PriorityLevel::HIGH);
You can’t perform that action at this time.
0 commit comments