diff --git a/benchmarks/BM_fill.cpp b/benchmarks/BM_fill.cpp deleted file mode 100644 index 86e0e7cf..00000000 --- a/benchmarks/BM_fill.cpp +++ /dev/null @@ -1,70 +0,0 @@ -// SPDX-License-Identifier: BSD-2-Clause - -// This code is part of the sfizz library and is licensed under a BSD 2-clause -// license. You should have receive a LICENSE.md file along with the code. -// If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz - -#include "SIMDHelpers.h" -#include -#include "Buffer.h" -#include -#include -#include - -static void Dummy(benchmark::State& state) { - sfz::Buffer buffer (state.range(0)); - std::random_device rd { }; - std::mt19937 gen { rd() }; - std::uniform_real_distribution dist { 1, 2 }; - for (auto _ : state) { - auto fillValue = dist(gen); - benchmark::DoNotOptimize(fillValue); - } -} - -static void FillScalar(benchmark::State& state) { - sfz::Buffer buffer (state.range(0)); - std::random_device rd { }; - std::mt19937 gen { rd() }; - std::uniform_real_distribution dist { 1, 2 }; - for (auto _ : state) { - sfz::fill(absl::MakeSpan(buffer), dist(gen)); - } -} - -static void FillScalar_unaligned(benchmark::State& state) { - sfz::Buffer buffer (state.range(0)); - std::random_device rd { }; - std::mt19937 gen { rd() }; - std::uniform_real_distribution dist { 1, 2 }; - for (auto _ : state) { - sfz::fill(absl::MakeSpan(buffer).subspan(1), dist(gen)); - } -} - -static void FillSIMD(benchmark::State& state) { - sfz::Buffer buffer (state.range(0)); - std::random_device rd { }; - std::mt19937 gen { rd() }; - std::uniform_real_distribution dist { 1, 2 }; - for (auto _ : state) { - sfz::fill(absl::MakeSpan(buffer), dist(gen)); - } -} - -static void FillSIMD_unaligned(benchmark::State& state) { - sfz::Buffer buffer (state.range(0)); - std::random_device rd { }; - std::mt19937 gen { rd() }; - std::uniform_real_distribution dist { 1, 2 }; - for (auto _ : state) { - sfz::fill(absl::MakeSpan(buffer).subspan(1), dist(gen)); - } -} - -BENCHMARK(Dummy)->RangeMultiplier(4)->Range((1<<2), (1<<12)); -BENCHMARK(FillScalar)->RangeMultiplier(4)->Range((1<<2), (1<<12)); -BENCHMARK(FillSIMD)->RangeMultiplier(4)->Range((1<<2), (1<<12)); -BENCHMARK(FillScalar_unaligned)->RangeMultiplier(4)->Range((1<<2), (1<<12)); -BENCHMARK(FillSIMD_unaligned)->RangeMultiplier(4)->Range((1<<2), (1<<12)); -BENCHMARK_MAIN(); diff --git a/benchmarks/CMakeLists.txt b/benchmarks/CMakeLists.txt index adf8d001..3f3ca5b2 100644 --- a/benchmarks/CMakeLists.txt +++ b/benchmarks/CMakeLists.txt @@ -38,7 +38,6 @@ sfizz_add_benchmark(bm_opf_high_vs_low BM_OPF_high_vs_low.cpp) sfizz_add_benchmark(bm_clock BM_clock.cpp) sfizz_add_benchmark(bm_write BM_writeInterleaved.cpp) sfizz_add_benchmark(bm_read BM_readInterleaved.cpp) -sfizz_add_benchmark(bm_fill BM_fill.cpp) sfizz_add_benchmark(bm_mathfuns BM_mathfuns.cpp) sfizz_add_benchmark(bm_gain BM_gain.cpp) sfizz_add_benchmark(bm_divide BM_divide.cpp)