Add FTZ to the filter benchmarks
Could add it in others too
This commit is contained in:
parent
f71dfff335
commit
9ba0949798
2 changed files with 15 additions and 0 deletions
|
|
@ -7,6 +7,7 @@
|
|||
#include "SIMDHelpers.h"
|
||||
#include "OnePoleFilter.h"
|
||||
#include "SfzFilter.h"
|
||||
#include "ScopedFTZ.h"
|
||||
#include <benchmark/benchmark.h>
|
||||
#include <random>
|
||||
#include <numeric>
|
||||
|
|
@ -45,6 +46,7 @@ public:
|
|||
};
|
||||
|
||||
BENCHMARK_DEFINE_F(FilterFixture, OnePole_VA)(benchmark::State& state) {
|
||||
ScopedFTZ ftz;
|
||||
sfz::OnePoleFilter<float> filter;
|
||||
for (auto _ : state)
|
||||
{
|
||||
|
|
@ -66,6 +68,7 @@ BENCHMARK_DEFINE_F(FilterFixture, OnePole_VA)(benchmark::State& state) {
|
|||
}
|
||||
|
||||
BENCHMARK_DEFINE_F(FilterFixture, OnePole_Faust)(benchmark::State& state) {
|
||||
ScopedFTZ ftz;
|
||||
sfz::Filter filter;
|
||||
filter.init(sampleRate);
|
||||
filter.setType(sfz::FilterType::kFilterLpf1p);
|
||||
|
|
@ -87,6 +90,7 @@ BENCHMARK_DEFINE_F(FilterFixture, OnePole_Faust)(benchmark::State& state) {
|
|||
}
|
||||
|
||||
BENCHMARK_DEFINE_F(FilterFixture, TwoPole_Faust)(benchmark::State& state) {
|
||||
ScopedFTZ ftz;
|
||||
sfz::Filter filter;
|
||||
filter.init(sampleRate);
|
||||
filter.setType(sfz::FilterType::kFilterLpf2p);
|
||||
|
|
@ -110,6 +114,7 @@ BENCHMARK_DEFINE_F(FilterFixture, TwoPole_Faust)(benchmark::State& state) {
|
|||
}
|
||||
|
||||
BENCHMARK_DEFINE_F(FilterFixture, TwoPoleShelf_Faust)(benchmark::State& state) {
|
||||
ScopedFTZ ftz;
|
||||
sfz::Filter filter;
|
||||
filter.init(sampleRate);
|
||||
filter.setType(sfz::FilterType::kFilterLsh);
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
#include "SIMDHelpers.h"
|
||||
#include "OnePoleFilter.h"
|
||||
#include "SfzFilter.h"
|
||||
#include "ScopedFTZ.h"
|
||||
#include <benchmark/benchmark.h>
|
||||
#include <random>
|
||||
#include <numeric>
|
||||
|
|
@ -50,6 +51,7 @@ public:
|
|||
};
|
||||
|
||||
BENCHMARK_DEFINE_F(FilterFixture, OnePole_MonoOnce)(benchmark::State& state) {
|
||||
ScopedFTZ ftz;
|
||||
sfz::Filter filterLeft;
|
||||
filterLeft.init(sampleRate);
|
||||
filterLeft.setType(sfz::FilterType::kFilterLpf1p);
|
||||
|
|
@ -71,6 +73,7 @@ BENCHMARK_DEFINE_F(FilterFixture, OnePole_MonoOnce)(benchmark::State& state) {
|
|||
}
|
||||
|
||||
BENCHMARK_DEFINE_F(FilterFixture, OnePole_MonoTwice)(benchmark::State& state) {
|
||||
ScopedFTZ ftz;
|
||||
sfz::Filter filterLeft;
|
||||
sfz::Filter filterRight;
|
||||
filterLeft.init(sampleRate);
|
||||
|
|
@ -100,6 +103,7 @@ BENCHMARK_DEFINE_F(FilterFixture, OnePole_MonoTwice)(benchmark::State& state) {
|
|||
}
|
||||
|
||||
BENCHMARK_DEFINE_F(FilterFixture, OnePole_Stereo)(benchmark::State& state) {
|
||||
ScopedFTZ ftz;
|
||||
sfz::Filter filter;
|
||||
filter.init(sampleRate);
|
||||
filter.setChannels(2);
|
||||
|
|
@ -128,6 +132,7 @@ BENCHMARK_DEFINE_F(FilterFixture, OnePole_Stereo)(benchmark::State& state) {
|
|||
}
|
||||
|
||||
BENCHMARK_DEFINE_F(FilterFixture, TwoPole_MonoOnce)(benchmark::State& state) {
|
||||
ScopedFTZ ftz;
|
||||
sfz::Filter filterLeft;
|
||||
filterLeft.init(sampleRate);
|
||||
filterLeft.setType(sfz::FilterType::kFilterLpf2p);
|
||||
|
|
@ -151,6 +156,7 @@ BENCHMARK_DEFINE_F(FilterFixture, TwoPole_MonoOnce)(benchmark::State& state) {
|
|||
}
|
||||
|
||||
BENCHMARK_DEFINE_F(FilterFixture, TwoPole_MonoTwice)(benchmark::State& state) {
|
||||
ScopedFTZ ftz;
|
||||
sfz::Filter filterLeft;
|
||||
sfz::Filter filterRight;
|
||||
filterLeft.init(sampleRate);
|
||||
|
|
@ -182,6 +188,7 @@ BENCHMARK_DEFINE_F(FilterFixture, TwoPole_MonoTwice)(benchmark::State& state) {
|
|||
}
|
||||
|
||||
BENCHMARK_DEFINE_F(FilterFixture, TwoPole_Stereo)(benchmark::State& state) {
|
||||
ScopedFTZ ftz;
|
||||
sfz::Filter filter;
|
||||
filter.init(sampleRate);
|
||||
filter.setChannels(2);
|
||||
|
|
@ -212,6 +219,7 @@ BENCHMARK_DEFINE_F(FilterFixture, TwoPole_Stereo)(benchmark::State& state) {
|
|||
}
|
||||
|
||||
BENCHMARK_DEFINE_F(FilterFixture, Shelf_MonoOnce)(benchmark::State& state) {
|
||||
ScopedFTZ ftz;
|
||||
sfz::Filter filterLeft;
|
||||
filterLeft.init(sampleRate);
|
||||
filterLeft.setType(sfz::FilterType::kFilterLpf2p);
|
||||
|
|
@ -237,6 +245,7 @@ BENCHMARK_DEFINE_F(FilterFixture, Shelf_MonoOnce)(benchmark::State& state) {
|
|||
}
|
||||
|
||||
BENCHMARK_DEFINE_F(FilterFixture, Shelf_MonoTwice)(benchmark::State& state) {
|
||||
ScopedFTZ ftz;
|
||||
sfz::Filter filterLeft;
|
||||
sfz::Filter filterRight;
|
||||
filterLeft.init(sampleRate);
|
||||
|
|
@ -269,6 +278,7 @@ BENCHMARK_DEFINE_F(FilterFixture, Shelf_MonoTwice)(benchmark::State& state) {
|
|||
}
|
||||
|
||||
BENCHMARK_DEFINE_F(FilterFixture, Shelf_Stereo)(benchmark::State& state) {
|
||||
ScopedFTZ ftz;
|
||||
sfz::Filter filter;
|
||||
filter.init(sampleRate);
|
||||
filter.setChannels(2);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue