Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions benches/sampler_bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@ pub fn bench_compute_convolution_fir(c: &mut Criterion) {
let fir = [5i16; 1024];
b.iter(|| sampler.compute_convolution_fir(&samples[..], &fir[..]))
});
#[target_feature(enable = "avx2")]
#[cfg(all(feature = "std", any(target_arch = "x86", target_arch = "x86_64")))]
c.bench_function("convolution_fir_avx2", |b| {
let sampler = Sampler::new(Synth::new(ChipModel::Mos6581));
let samples = [2i16; 1024];
let fir = [5i16; 1024];
b.iter(|| unsafe { sampler.compute_convolution_fir_avx2(&samples[..], &fir[..]) })
});
#[target_feature(enable = "sse4.2")]
#[cfg(all(feature = "std", any(target_arch = "x86", target_arch = "x86_64")))]
c.bench_function("convolution_fir_sse", |b| {
let sampler = Sampler::new(Synth::new(ChipModel::Mos6581));
let samples = [2i16; 1024];
Expand Down