mirror of
https://github.com/arnaucube/fft-rs.git
synced 2026-02-06 19:06:43 +01:00
Add IFFT
Benchmarks (Intel Core i5-6300U @ 4x 3GHz, 16GB RAM): ``` dft time: [49.610 ms 50.141 ms 50.861 ms] idft time: [49.531 ms 49.938 ms 50.412 ms] fft time: [848.62 us 853.68 us 859.08 us] ifft time: [849.98 us 852.73 us 856.13 us] ```
This commit is contained in:
@@ -12,10 +12,13 @@ fn criterion_benchmark(c: &mut Criterion) {
|
||||
.sample_iter(rand::distributions::Standard)
|
||||
.take(1024)
|
||||
.collect();
|
||||
let f = fft_rs::fft(&values);
|
||||
|
||||
c.bench_function("dft", |b| b.iter(|| fft_rs::dft(&values)));
|
||||
c.bench_function("idft", |b| b.iter(|| fft_rs::idft(&f)));
|
||||
|
||||
c.bench_function("fft", |b| b.iter(|| fft_rs::fft(&values)));
|
||||
c.bench_function("ifft", |b| b.iter(|| fft_rs::ifft(&f)));
|
||||
}
|
||||
|
||||
criterion_group!(benches, criterion_benchmark);
|
||||
|
||||
Reference in New Issue
Block a user