Performance over time
How ComposableTuringIDModels's benchmark suites have moved across recent revisions: an overall summary across the package first, then one section per suite.
Summary
Each benchmark suite's headline timing across recent revisions.
| Suite | Median ratio | Trend | Status |
|---|---|---|---|
| AD gradients | 0.99 | → | ok |
| Model evaluation | 1.0 | → | ok |
| Sampling | 0.97 | ↘ | ok |
| time_to_load | 0.78 | ↘ | ok |
Ratio: latest vs oldest shown revision (1.00 = no change, higher = slower/larger). ⚠ reg = at/above the regression threshold.

Tables below show the most recent 4 revisions, columns labelled by commit date.
AD gradients
Time
| Benchmark | v0.1.2 | v0.1.1 | v0.1.0 | 4d9aae795c4912... |
|---|---|---|---|---|
| AR latent logjoint/ForwardDiff | 12.9 ± 1.6 μs | 13.3 ± 3.2 μs | 13.7 ± 7.3 μs | 12.6 ± 1.6 μs |
| AR latent logjoint/Mooncake reverse | 6.18 ± 0.85 μs | 5.94 ± 0.85 μs | 5.89 ± 0.82 μs | 6.1 ± 0.82 μs |
| AR latent logjoint/ReverseDiff (tape) | 0.0353 ± 0.0066 ms | 0.0369 ± 0.008 ms | 0.0372 ± 0.0081 ms | 0.0348 ± 0.0068 ms |
| DirectInfections+Poisson posterior/Enzyme reverse | 3.29 ± 0.3 μs | 0.0553 ± 0.0007 ms | 0.0562 ± 0.00073 ms | 3.58 ± 0.31 μs |
| DirectInfections+Poisson posterior/ForwardDiff | 17.8 ± 1.7 μs | 0.172 ± 0.0091 ms | 0.176 ± 0.0097 ms | 17.7 ± 1.5 μs |
| DirectInfections+Poisson posterior/Mooncake reverse | 7.45 ± 0.64 μs | 0.0618 ± 0.00089 ms | 0.063 ± 0.001 ms | 7.52 ± 0.67 μs |
| DirectInfections+Poisson posterior/ReverseDiff (tape) | 0.0922 ± 0.018 ms | 0.13 ± 0.02 ms | 0.131 ± 0.021 ms | 0.093 ± 0.021 ms |
Memory
| Benchmark | v0.1.2 | v0.1.1 | v0.1.0 | 4d9aae795c4912... |
|---|---|---|---|---|
| AR latent logjoint/ForwardDiff | 0.059 k allocs: 0.0512 MB | 0.056 k allocs: 0.0508 MB | 0.056 k allocs: 0.0508 MB | 0.059 k allocs: 0.0512 MB |
| AR latent logjoint/Mooncake reverse | 0.043 k allocs: 4.64 kB | 0.036 k allocs: 4.42 kB | 0.036 k allocs: 4.42 kB | 0.043 k allocs: 4.64 kB |
| AR latent logjoint/ReverseDiff (tape) | 0.73 k allocs: 30.4 kB | 0.764 k allocs: 0.0315 MB | 0.764 k allocs: 0.0315 MB | 0.73 k allocs: 30.4 kB |
| DirectInfections+Poisson posterior/Enzyme reverse | 0.036 k allocs: 4.41 kB | 0.244 k allocs: 12.4 kB | 0.244 k allocs: 12.4 kB | 0.037 k allocs: 4.44 kB |
| DirectInfections+Poisson posterior/ForwardDiff | 0.068 k allocs: 0.0591 MB | 0.68 k allocs: 0.0835 MB | 0.68 k allocs: 0.0835 MB | 0.068 k allocs: 0.0591 MB |
| DirectInfections+Poisson posterior/Mooncake reverse | 0.038 k allocs: 4.83 kB | 0.346 k allocs: 15.9 kB | 0.346 k allocs: 15.9 kB | 0.038 k allocs: 4.83 kB |
| DirectInfections+Poisson posterior/ReverseDiff (tape) | 1.68 k allocs: 0.0637 MB | 1.58 k allocs: 0.062 MB | 1.58 k allocs: 0.062 MB | 1.68 k allocs: 0.0637 MB |
Model evaluation
Time
| Benchmark | v0.1.2 | v0.1.1 | v0.1.0 | 4d9aae795c4912... |
|---|---|---|---|---|
| AR latent/forward | 0.605 ± 0.87 μs | 0.6 ± 0.85 μs | 0.642 ± 0.85 μs | 0.581 ± 0.86 μs |
| AR latent/rand | 0.726 ± 1 μs | 0.654 ± 0.98 μs | 0.66 ± 0.98 μs | 0.71 ± 0.99 μs |
| DirectInfections+Poisson/forward | 1.85 ± 0.17 μs | 0.0544 ± 0.00089 ms | 0.0551 ± 0.00086 ms | 1.84 ± 0.19 μs |
| DirectInfections+Poisson/rand | 0.844 ± 1 μs | 0.0536 ± 0.00082 ms | 0.0543 ± 0.00082 ms | 0.791 ± 0.99 μs |
| RandomWalk latent/forward | 0.991 ± 0.66 μs | 1.01 ± 0.67 μs | 1.01 ± 0.67 μs | 1.01 ± 0.66 μs |
| RandomWalk latent/rand | 1.14 ± 0.78 μs | 1.13 ± 0.79 μs | 1.12 ± 0.78 μs | 1.13 ± 0.78 μs |
| Renewal+NegativeBinomial/forward | 6.3 ± 1.5 μs | 0.0583 ± 0.0012 ms | 0.0595 ± 0.0012 ms | 6.35 ± 1.6 μs |
| Renewal+NegativeBinomial/rand | 3.74 ± 2.4 μs | 0.0562 ± 0.00099 ms | 0.0573 ± 0.0014 ms | 3.75 ± 2.4 μs |
Memory
| Benchmark | v0.1.2 | v0.1.1 | v0.1.0 | 4d9aae795c4912... |
|---|---|---|---|---|
| AR latent/forward | 21 allocs: 2.44 kB | 20 allocs: 2.41 kB | 20 allocs: 2.41 kB | 21 allocs: 2.44 kB |
| AR latent/rand | 23 allocs: 2.86 kB | 22 allocs: 2.83 kB | 22 allocs: 2.83 kB | 23 allocs: 2.86 kB |
| DirectInfections+Poisson/forward | 23 allocs: 2.52 kB | 0.35 k allocs: 15.8 kB | 0.35 k allocs: 15.8 kB | 23 allocs: 2.52 kB |
| DirectInfections+Poisson/rand | 20 allocs: 2.67 kB | 0.349 k allocs: 15.1 kB | 0.349 k allocs: 15.1 kB | 20 allocs: 2.67 kB |
| RandomWalk latent/forward | 17 allocs: 1.86 kB | 16 allocs: 1.83 kB | 16 allocs: 1.83 kB | 17 allocs: 1.86 kB |
| RandomWalk latent/rand | 16 allocs: 2.08 kB | 15 allocs: 2.05 kB | 15 allocs: 2.05 kB | 16 allocs: 2.08 kB |
| Renewal+NegativeBinomial/forward | 0.153 k allocs: 8.28 kB | 0.57 k allocs: 23.7 kB | 0.57 k allocs: 23.7 kB | 0.153 k allocs: 8.28 kB |
| Renewal+NegativeBinomial/rand | 0.148 k allocs: 8.38 kB | 0.567 k allocs: 23 kB | 0.567 k allocs: 23 kB | 0.148 k allocs: 8.38 kB |
Sampling
Time
| Benchmark | v0.1.2 | v0.1.1 | v0.1.0 | 4d9aae795c4912... |
|---|---|---|---|---|
| NUTS (DirectInfections+Poisson, 50 draws) | 0.116 ± 0.0087 s | 0.789 ± 0.019 s | 0.816 ± 0.034 s | 0.112 ± 0.0039 s |
Memory
| Benchmark | v0.1.2 | v0.1.1 | v0.1.0 | 4d9aae795c4912... |
|---|---|---|---|---|
| NUTS (DirectInfections+Poisson, 50 draws) | 0.369 M allocs: 0.252 GB | 2.88 M allocs: 0.354 GB | 2.88 M allocs: 0.354 GB | 0.369 M allocs: 0.252 GB |
time_to_load
Time
| Benchmark | v0.1.2 | v0.1.1 | v0.1.0 | 4d9aae795c4912... |
|---|---|---|---|---|
| time_to_load | 4.04 ± 0.042 s | 3.95 ± 0.025 s | 3.98 ± 0.035 s | 3.15 ± 0.024 s |
Memory
| Benchmark | v0.1.2 | v0.1.1 | v0.1.0 | 4d9aae795c4912... |
|---|---|---|---|---|
| time_to_load | 0.2 k allocs: 11.8 kB | 0.2 k allocs: 11.8 kB | 0.2 k allocs: 11.8 kB | 0.2 k allocs: 11.8 kB |
Per-benchmark timelines
<details> <summary>Show 1 plot</summary>

</details>
About these benchmarks
ComposableTuringIDModels tracks the performance of representative modelling operations over time. The suite is a prototype: it covers a small set of representative models rather than exhaustively measuring every component, and the numbers are indicative rather than a guarantee.
Benchmarking reuses the shared tooling in EpiAwarePackageTools.Benchmarks rather than re-implementing a runner or a comparison report. The package owns the suite definition (benchmark/benchmarks.jl); the kit owns running it and turning results into a legible pull-request comment.
What is measured
The suite is a BenchmarkTools.BenchmarkGroup named SUITE, defined in benchmark/benchmarks.jl, with three groups.
Model evaluation — building and evaluating representative models. For each model the suite times a prior draw (
rand, which samples every random variable) and the forward pass (model(), which returns the generated quantities). The models are two latent processes (AR,RandomWalk) and two composedIDModels (DirectInfectionswithPoissonError, andRenewalwithNegativeBinomialError), each turned into a Turing model viaas_turing_model.Sampling — a short NUTS run (50 draws) on a composed
DirectInfections+PoissonErrormodel conditioned on data simulated from its own prior.AD gradients — the gradient of a representative log-density across automatic-differentiation backends (
ForwardDiff,ReverseDiff,Mooncake, andEnzymewhere supported). Results are keyed by scenario and backend so the comparison report folds them into a per-(scenario × backend) matrix.
Running the suite locally
The benchmark/ directory is its own Julia environment. Run the whole suite and save the results with the managed runner, which calls EpiAwarePackageTools.Benchmarks.run_suite:
julia --project=benchmark benchmark/run.jl results.jsonrun_suite uses a short per-benchmark time budget so a full run stays affordable while the minimum-time estimator used in the comparison stays stable. To compare two result files and write a Markdown report, use the managed comparison script, which calls EpiAwarePackageTools.Benchmarks.compare_comment:
julia --project=benchmark benchmark/compare.jl pr.json base.json comment.mdContinuous integration
Two workflows drive benchmarking in CI, both building on the shared kit.
benchmark.yamlruns on pull requests. It benchmarks the pull-request head and the base branch in separate jobs, then posts (and updates) a single comparison comment: a bucketed summary plus collapsed per-benchmark tables split into evaluation and AD-gradient groups.benchmark-history.yamlruns on pushes tomainand on tags. It benchmarks the recent tagged releases plus the current commit with AirspeedVelocity and publishes a timeline to the repository'sbenchmarksbranch. The kit'sasv_comment/flatten_asvhelpers read the same AirspeedVelocity result format when a report is needed.