Wave 8 — depth across four fronts: Studio — @lawsynth/api-client gains the real discovery-run endpoints; the Studio discovery flow now drives the LIVE client (submit -> bounded-poll -> getWorld -> feed screens), with an in-memory fake transport for offline end-to-end tests. Export — lawsynth export --format c|onnx|matlab. The C compiles clean and matches the engine to ~1e-14; ONNX is an honest computation-graph JSON (each node mapped to its standard ONNX op, DAG-interned, evaluator-verified); MATLAB .m emitted. Notebook — WorldExplorerWidget: a self-contained embedded-JS widget that re-simulates in-browser on slider drag (no kernel round-trip); factors each discovered coefficient into a tunable parameter. study.discover().explore(). Performance — single-pass streaming CSV parser: 3.19x faster ingest (500k rows 224ms->70ms, 328 MiB/s; 1M rows 7.2M rows/s), byte-for-byte identical output (equivalence-tested), plus streaming Read-based loaders + progress callbacks + a scale benchmark. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
30 lines
797 B
Rust
30 lines
797 B
Rust
use std::{hint::black_box, time::Instant};
|
|
|
|
use lawsynth_core::Identifier;
|
|
use lawsynth_data::{Dataset, NumericColumn, TimeAxis};
|
|
|
|
fn dataset() -> Dataset {
|
|
let time = (0..10_000).map(|i| i as f64 * 0.01).collect();
|
|
Dataset::new(
|
|
TimeAxis::new(time).unwrap(),
|
|
[NumericColumn::new(
|
|
Identifier::new("x").unwrap(),
|
|
(0..10_000).map(|i| (i as f64).sin()).collect(),
|
|
)],
|
|
)
|
|
.unwrap()
|
|
}
|
|
|
|
fn main() {
|
|
let data = dataset();
|
|
let started = Instant::now();
|
|
let mut rows = 0;
|
|
for _ in 0..200 {
|
|
rows += black_box(data.batches(256).unwrap())
|
|
.iter()
|
|
.map(|batch| batch.time.len())
|
|
.sum::<usize>();
|
|
}
|
|
println!("materialized {rows} aligned batch rows in {:?}", started.elapsed());
|
|
}
|