Skip to content

Benchmarks

ComposedDistributions benchmarks its composition algebra to track performance over time.

What the suite covers

  • Composition: construction, rand, and scoring (logpdf/logccdf) for one representative tree per composer — Sequential, Parallel, Resolve, Compete, and Choose — plus the compose front-end lowering a NamedTuple into a small nested (Parallel-of-Sequential/Resolve) tree, the shape of a typical onset → admission → outcome model.

  • AD gradients: the same scenarios test/ad/runtests.jl exercises (a Sequential chain, a Resolve mixture marginal, and a Compete racing-hazard marginal), timed per AD backend (ForwardDiff, ReverseDiff, Mooncake, Enzyme). A (scenario, backend) pair is only benchmarked once its gradient is confirmed finite, so a backend that cannot yet handle a scenario is silently omitted rather than failing the run.

Running the suite locally

bash
julia --project=benchmark benchmark/run.jl results.json

Or compare the working tree against another revision with AirspeedVelocity's benchpkg:

bash
benchpkg --rev=main,dirty --script=benchmark/benchmarks.jl

Reading the history

The plot and table below are generated by the benchmark-history CI job on every push to main and on tagged releases, and published to the repo's benchmarks branch. Each point is a full run of the suite above at that revision; a rising line in a timing panel is a regression, a falling one an improvement.

Performance history

The performance timeline (per-benchmark plots and a ratio table) is published to the benchmarks branch on each push to main and each tagged release.