diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fefc1b9dde41..fa27af1fec20 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -120,6 +120,8 @@ add_library(bitcoin_consensus STATIC EXCLUDE_FROM_ALL script/interpreter.cpp script/script.cpp script/script_error.cpp + script/valtype_stack.cpp + script/val64.cpp uint256.cpp ) target_link_libraries(bitcoin_consensus diff --git a/src/bench/CMakeLists.txt b/src/bench/CMakeLists.txt index 16eb29250f50..367e758b0646 100644 --- a/src/bench/CMakeLists.txt +++ b/src/bench/CMakeLists.txt @@ -23,6 +23,7 @@ add_executable(bench_bitcoin disconnected_transactions.cpp duplicate_inputs.cpp ellswift.cpp + evalscript.cpp examples.cpp gcs_filter.cpp hashpadding.cpp @@ -34,6 +35,7 @@ add_executable(bench_bitcoin mempool_eviction.cpp mempool_stress.cpp merkle_root.cpp + micro.cpp parse_hex.cpp peer_eviction.cpp poly1305.cpp @@ -48,10 +50,25 @@ add_executable(bench_bitcoin streams_findbyte.cpp strencodings.cpp util_time.cpp + val64.cpp verify_script.cpp xor.cpp ) +add_executable(bench_varops + bench_varops.cpp + bench.cpp + nanobench.cpp +) + +target_link_libraries(bench_varops + core_interface + test_util + bitcoin_node + secp256k1 + Boost::headers +) + include(TargetDataSources) target_raw_data_sources(bench_bitcoin NAMESPACE benchmark::data data/block413567.raw @@ -61,6 +78,7 @@ target_link_libraries(bench_bitcoin core_interface test_util bitcoin_node + secp256k1 Boost::headers ) diff --git a/src/bench/bench_varops.cpp b/src/bench/bench_varops.cpp new file mode 100644 index 000000000000..299616fdb1e3 --- /dev/null +++ b/src/bench/bench_varops.cpp @@ -0,0 +1,1072 @@ +// Copyright (c) 2025 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 +#include +#include