// Copyright (c) The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or https://opensource.org/license/mit/. #include #include #include #include #include static void Xor(benchmark::Bench& bench) { FastRandomContext frc{/*fDeterministic=*/true}; auto data{frc.randbytes(1024)}; auto key{frc.randbytes(31)}; bench.batch(data.size()).unit("byte").run([&] { util::Xor(data, key); }); } BENCHMARK(Xor, benchmark::PriorityLevel::HIGH);