From bb95d8ed861c0b8dcb88deeb979f48d49781b765 Mon Sep 17 00:00:00 2001 From: Paul Ferrand Date: Tue, 30 Jul 2019 18:41:42 +0200 Subject: [PATCH] Updated benchmarks --- benchmarks/AudioBuffers.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/benchmarks/AudioBuffers.cpp b/benchmarks/AudioBuffers.cpp index c820ee2c..1c2c9fba 100644 --- a/benchmarks/AudioBuffers.cpp +++ b/benchmarks/AudioBuffers.cpp @@ -6,8 +6,7 @@ static void AB_Joint_Fill_float(benchmark::State& state) { AudioBuffer buffer (65535); float fillValue = 0.0f; for (auto _ : state) { - std::fill(buffer.begin(0), buffer.end(0), fillValue); - std::fill(buffer.begin(1), buffer.end(1), fillValue); + buffer.fill(fillValue); fillValue += 1.0f; } } @@ -18,8 +17,7 @@ static void AB_Split_Fill_float(benchmark::State& state) { SplitAudioBuffer buffer (65535); float fillValue = 0.0f; for (auto _ : state) { - std::fill(buffer.begin(0), buffer.end(0), fillValue); - std::fill(buffer.begin(1), buffer.end(1), fillValue); + buffer.fill(fillValue); fillValue += 1.0f; } } @@ -29,8 +27,7 @@ static void AB_Joint_Fill_double(benchmark::State& state) { AudioBuffer buffer (65535); double fillValue = 0.0; for (auto _ : state) { - std::fill(buffer.begin(0), buffer.end(0), fillValue); - std::fill(buffer.begin(1), buffer.end(1), fillValue); + buffer.fill(fillValue); fillValue += 1.0; } } @@ -41,8 +38,7 @@ static void AB_Split_Fill_double(benchmark::State& state) { SplitAudioBuffer buffer (65535); double fillValue = 0.0; for (auto _ : state) { - std::fill(buffer.begin(0), buffer.end(0), fillValue); - std::fill(buffer.begin(1), buffer.end(1), fillValue); + buffer.fill(fillValue); fillValue += 1.0; } }