lawsynth/crates/lawsynth-discovery/benches/candidate_throughput.rs
caelum0x b5da90b795 feat: discovery Pareto frontier + regime/uncertainty stages + benchmark execution engine
Discovery (§8/§16): add Pareto-frontier construction over the multi-objective
candidate score vector (DiscoveryResult.frontier + pareto_frontier()), opt-in
regime segmentation (result.regimes), and bootstrap uncertainty attachment;
CLI --pareto/--regimes flags. Benchmarks: a real generate->run->score->classify
execution engine driving the compiled CLI (9 supported cases end-to-end, 21
honest capability boundaries).

Rust workspace 329->342 tests; benchmarks +8 tests. clippy -D warnings clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-17 17:00:40 +03:00

23 lines
838 B
Rust

use lawsynth_core::Identifier;
use lawsynth_data::{Dataset, NumericColumn, TimeAxis};
use lawsynth_discovery::infer_lagged_dependencies;
use std::{hint::black_box, time::Instant};
fn main() {
let x = Identifier::new("x").unwrap();
let y = Identifier::new("y").unwrap();
let data = Dataset::new(
TimeAxis::new((0..1_000).map(|i| i as f64).collect()).unwrap(),
[
NumericColumn::new(x, (0..1_000).map(|i| i as f64).collect()),
NumericColumn::new(y, (0_u32..1_000).map(|i| i.saturating_sub(1) as f64).collect()),
],
)
.unwrap();
let started = Instant::now();
let mut edges = 0;
for _ in 0..100 {
edges += black_box(infer_lagged_dependencies(&data, 2, 0.9).unwrap()).edges.len();
}
println!("inferred {edges} edges in {:?}", started.elapsed());
}