lawsynth/crates/lawsynth-dynamics/benches/implicit_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

19 lines
687 B
Rust

use lawsynth_core::Identifier;
use lawsynth_data::{Dataset, NumericColumn, TimeAxis};
use lawsynth_dynamics::ImplicitProblem;
use std::{hint::black_box, time::Instant};
fn main() {
let x = Identifier::new("x").unwrap();
let data = Dataset::new(
TimeAxis::new((0..1_000).map(|i| i as f64).collect()).unwrap(),
[NumericColumn::new(x.clone(), (0..1_000).map(|i| i as f64).collect())],
)
.unwrap();
let started = Instant::now();
let mut n = 0;
for _ in 0..10_000 {
n += black_box(ImplicitProblem::new(data.clone(), [x.clone()]).unwrap()).variables().len();
}
println!("validated {n} implicit states in {:?}", started.elapsed());
}