caelum0x 8af85c6e28 style: format workspace to rustfmt.toml (use_small_heuristics = Max)
Bring the whole workspace into compliance with the repo's rustfmt config
(edition 2024, max_width 100, use_small_heuristics = "Max"), which had drifted
across many crates. Pure formatting — no logic changes; `cargo fmt --check` is
now clean and `cargo build --workspace` is green.
2026-08-18 16:59:40 +03:00

16 lines
578 B
Rust

use lawsynth_differentiate::spectral_derivative;
use std::{hint::black_box, time::Instant};
fn main() {
let time = (0..2_048).map(|i| i as f64 * std::f64::consts::TAU / 2_048.0).collect::<Vec<_>>();
let values = (0..2_048)
.map(|i| ((i as f64) * std::f64::consts::TAU / 2_048.0).sin())
.collect::<Vec<_>>();
let started = Instant::now();
let mut len = 0;
for _ in 0..100 {
len += black_box(spectral_derivative(&time, &values).unwrap()).len();
}
println!("differentiated {len} spectral samples in {:?}", started.elapsed());
}