mcframework.benchmark.run_suite#
- mcframework.benchmark.run_suite(sim: MonteCarloSimulation, sizes: Sequence[int], specs: Sequence[BackendSpec], *, n_workers: int | None = None, repeats: int = 1, quick: bool = False, max_sequential_size: int = 1000000, progress: Callable[[str, int, int], None] | None = None) BenchmarkReport[source]#
Benchmark
simacross thesizesxspecsmatrix.- Parameters:
- sim
MonteCarloSimulation Simulation to benchmark.
- sizessequence of
int Simulation sizes to time.
- specssequence of
BackendSpec Backends to time.
- n_workers
int, optional Worker count for parallel backends (defaults to CPU count downstream).
- repeats
int, default 1 Timed repetitions per cell (best time kept).
- quick
bool, defaultFalse Skip the sequential backend above
max_sequential_sizeto keep the run fast (sequential is O(n) and dominates wall time at large sizes).- max_sequential_size
int, default 1_000_000 Sequential cutoff used when
quickis enabled.- progress
callable(), optional Called as
progress(label, n, total)after each measured cell.
- sim
- Returns: