lawsynth/crates/lawsynth-stats/benches/distributions_throughput.rs
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

13 lines
417 B
Rust

use lawsynth_stats::{normal_cdf, normal_pdf};
use std::{hint::black_box, time::Instant};
fn main() {
let started = Instant::now();
let mut sum = 0.0;
for i in 0..1_000_000 {
let x = i as f64 / 100_000.0 - 5.0;
sum += black_box(normal_pdf(x, 0.0, 1.0).unwrap() + normal_cdf(x, 0.0, 1.0).unwrap());
}
println!("evaluated normal primitives ({sum:.3}) in {:?}", started.elapsed());
}