Performance over time
How ModifiedDistributions'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.
Not enough comparable revisions to compute ratios yet — the summary populates once a second revision is benchmarked.
Tables below show the most recent 1 revision, columns labelled by commit date.
AD gradients
Time
| Benchmark | 32ea6df784e6a8... |
|---|---|
| Affine LogNormal scale+shift logpdf/Enzyme forward | 8.35 ± 0.1 μs |
| Affine LogNormal scale+shift logpdf/Enzyme reverse | 2.99 ± 0.052 μs |
| Affine LogNormal scale+shift logpdf/ForwardDiff | 0.749 ± 0.094 μs |
| Affine LogNormal scale+shift logpdf/Mooncake forward | 6.72 ± 0.31 μs |
| Affine LogNormal scale+shift logpdf/Mooncake reverse | 18 ± 0.74 μs |
| Affine LogNormal scale+shift logpdf/ReverseDiff (tape) | 16.4 ± 0.42 μs |
| Modified LogNormal identity-link logpdf/Enzyme forward | 8.66 ± 0.083 μs |
| Modified LogNormal identity-link logpdf/Enzyme reverse | 5.86 ± 1.1 μs |
| Modified LogNormal identity-link logpdf/ForwardDiff | 0.992 ± 0.019 μs |
| Modified LogNormal identity-link logpdf/Mooncake forward | 8.27 ± 0.16 μs |
| Modified LogNormal identity-link logpdf/Mooncake reverse | 0.0428 ± 0.0051 ms |
| Modified LogNormal identity-link logpdf/ReverseDiff (tape) | 0.0324 ± 0.00061 ms |
| Modified LogNormal log-link logpdf/Enzyme forward | 8.5 ± 0.08 μs |
| Modified LogNormal log-link logpdf/Enzyme reverse | 3.52 ± 0.059 μs |
| Modified LogNormal log-link logpdf/ForwardDiff | 0.905 ± 0.092 μs |
| Modified LogNormal log-link logpdf/Mooncake forward | 7.42 ± 0.14 μs |
| Modified LogNormal log-link logpdf/Mooncake reverse | 0.0405 ± 0.004 ms |
| Modified LogNormal log-link logpdf/ReverseDiff (tape) | 27.3 ± 0.53 μs |
| Product{Weighted} LogNormal vector logpdf/Enzyme forward | 8.28 ± 0.18 μs |
| Product{Weighted} LogNormal vector logpdf/Enzyme reverse | 1.02 ± 0.25 μs |
| Product{Weighted} LogNormal vector logpdf/ForwardDiff | 0.884 ± 0.065 μs |
| Product{Weighted} LogNormal vector logpdf/Mooncake forward | 7.22 ± 0.95 μs |
| Product{Weighted} LogNormal vector logpdf/Mooncake reverse | 28.2 ± 2 μs |
| Product{Weighted} LogNormal vector logpdf/ReverseDiff (tape) | 16.6 ± 0.41 μs |
| Thinned convolved series sum/Enzyme forward | 10.6 ± 0.16 μs |
| Thinned convolved series sum/Enzyme reverse | 14.3 ± 0.18 μs |
| Thinned convolved series sum/ForwardDiff | 3.25 ± 0.044 μs |
| Thinned convolved series sum/Mooncake forward | 12.2 ± 0.4 μs |
| Thinned convolved series sum/Mooncake reverse | 30.3 ± 5 μs |
| Thinned convolved series sum/ReverseDiff (tape) | 0.0373 ± 0.00079 ms |
| Transformed cumulative LogNormal logpdf/Enzyme forward | 8 ± 0.07 μs |
| Transformed cumulative LogNormal logpdf/Enzyme reverse | 1.95 ± 0.038 μs |
| Transformed cumulative LogNormal logpdf/ForwardDiff | 0.505 ± 0.073 μs |
| Transformed cumulative LogNormal logpdf/Mooncake forward | 5.4 ± 0.25 μs |
| Transformed cumulative LogNormal logpdf/Mooncake reverse | 24.2 ± 6.6 μs |
| Transformed cumulative LogNormal logpdf/ReverseDiff (tape) | 15 ± 0.41 μs |
| Transformed thin LogNormal logpdf/Enzyme forward | 8.02 ± 0.07 μs |
| Transformed thin LogNormal logpdf/Enzyme reverse | 1.96 ± 0.039 μs |
| Transformed thin LogNormal logpdf/ForwardDiff | 0.512 ± 0.071 μs |
| Transformed thin LogNormal logpdf/Mooncake forward | 5.46 ± 0.51 μs |
| Transformed thin LogNormal logpdf/Mooncake reverse | 23.9 ± 6.6 μs |
| Transformed thin LogNormal logpdf/ReverseDiff (tape) | 14.9 ± 0.39 μs |
| Weighted Affine LogNormal nested logpdf/Enzyme forward | 8.18 ± 0.097 μs |
| Weighted Affine LogNormal nested logpdf/Enzyme reverse | 0.951 ± 0.075 μs |
| Weighted Affine LogNormal nested logpdf/ForwardDiff | 0.78 ± 0.085 μs |
| Weighted Affine LogNormal nested logpdf/Mooncake forward | 7.29 ± 0.17 μs |
| Weighted Affine LogNormal nested logpdf/Mooncake reverse | 19.2 ± 0.86 μs |
| Weighted Affine LogNormal nested logpdf/ReverseDiff (tape) | 18.3 ± 0.43 μs |
| Weighted LogNormal observation-time weight logpdf/Enzyme forward | 7.92 ± 0.065 μs |
| Weighted LogNormal observation-time weight logpdf/Enzyme reverse | 1.28 ± 0.32 μs |
| Weighted LogNormal observation-time weight logpdf/ForwardDiff | 0.558 ± 0.074 μs |
| Weighted LogNormal observation-time weight logpdf/Mooncake forward | 6.02 ± 0.67 μs |
| Weighted LogNormal observation-time weight logpdf/Mooncake reverse | 29.5 ± 2.7 μs |
| Weighted LogNormal observation-time weight logpdf/ReverseDiff (tape) | 17.2 ± 0.43 μs |
| Weighted LogNormal scalar logpdf/Enzyme forward | 7.94 ± 0.068 μs |
| Weighted LogNormal scalar logpdf/Enzyme reverse | 1.3 ± 0.3 μs |
| Weighted LogNormal scalar logpdf/ForwardDiff | 0.545 ± 0.068 μs |
| Weighted LogNormal scalar logpdf/Mooncake forward | 5.98 ± 0.66 μs |
| Weighted LogNormal scalar logpdf/Mooncake reverse | 0.0361 ± 0.0031 ms |
| Weighted LogNormal scalar logpdf/ReverseDiff (tape) | 17 ± 0.43 μs |
| Weighted Sequential observed-total logpdf/Enzyme forward | 0.115 ± 0.0028 ms |
| Weighted Sequential observed-total logpdf/Enzyme reverse | 0.353 ± 0.034 ms |
| Weighted Sequential observed-total logpdf/ForwardDiff | 0.0831 ± 0.00096 ms |
| Weighted Sequential observed-total logpdf/Mooncake forward | 0.416 ± 0.024 ms |
| Weighted Sequential observed-total logpdf/Mooncake reverse | 1.3 ± 0.072 ms |
| Weighted Sequential observed-total logpdf/ReverseDiff (tape) | 2.33 ± 0.3 ms |
Memory
| Benchmark | 32ea6df784e6a8... |
|---|---|
| Affine LogNormal scale+shift logpdf/Enzyme forward | 0.044 k allocs: 1.52 kB |
| Affine LogNormal scale+shift logpdf/Enzyme reverse | 24 allocs: 0.969 kB |
| Affine LogNormal scale+shift logpdf/ForwardDiff | 7 allocs: 0.484 kB |
| Affine LogNormal scale+shift logpdf/Mooncake forward | 0.07 k allocs: 3.33 kB |
| Affine LogNormal scale+shift logpdf/Mooncake reverse | 0.292 k allocs: 13.5 kB |
| Affine LogNormal scale+shift logpdf/ReverseDiff (tape) | 0.248 k allocs: 10.6 kB |
| Modified LogNormal identity-link logpdf/Enzyme forward | 0.04 k allocs: 1.25 kB |
| Modified LogNormal identity-link logpdf/Enzyme reverse | 28 allocs: 3.41 kB |
| Modified LogNormal identity-link logpdf/ForwardDiff | 7 allocs: 0.359 kB |
| Modified LogNormal identity-link logpdf/Mooncake forward | 0.064 k allocs: 3.06 kB |
| Modified LogNormal identity-link logpdf/Mooncake reverse | 0.485 k allocs: 0.0416 MB |
| Modified LogNormal identity-link logpdf/ReverseDiff (tape) | 0.465 k allocs: 17.8 kB |
| Modified LogNormal log-link logpdf/Enzyme forward | 0.04 k allocs: 1.25 kB |
| Modified LogNormal log-link logpdf/Enzyme reverse | 24 allocs: 0.969 kB |
| Modified LogNormal log-link logpdf/ForwardDiff | 7 allocs: 0.359 kB |
| Modified LogNormal log-link logpdf/Mooncake forward | 0.064 k allocs: 3.06 kB |
| Modified LogNormal log-link logpdf/Mooncake reverse | 0.439 k allocs: 0.039 MB |
| Modified LogNormal log-link logpdf/ReverseDiff (tape) | 0.377 k allocs: 14.9 kB |
| Product{Weighted} LogNormal vector logpdf/Enzyme forward | 0.053 k allocs: 2.31 kB |
| Product{Weighted} LogNormal vector logpdf/Enzyme reverse | 16 allocs: 0.922 kB |
| Product{Weighted} LogNormal vector logpdf/ForwardDiff | 15 allocs: 1.06 kB |
| Product{Weighted} LogNormal vector logpdf/Mooncake forward | 0.116 k allocs: 6.31 kB |
| Product{Weighted} LogNormal vector logpdf/Mooncake reverse | 0.372 k allocs: 23.5 kB |
| Product{Weighted} LogNormal vector logpdf/ReverseDiff (tape) | 0.239 k allocs: 10 kB |
| Thinned convolved series sum/Enzyme forward | 0.043 k allocs: 1.86 kB |
| Thinned convolved series sum/Enzyme reverse | 0.036 k allocs: 1.86 kB |
| Thinned convolved series sum/ForwardDiff | 13 allocs: 0.922 kB |
| Thinned convolved series sum/Mooncake forward | 0.094 k allocs: 4.89 kB |
| Thinned convolved series sum/Mooncake reverse | 0.263 k allocs: 21.5 kB |
| Thinned convolved series sum/ReverseDiff (tape) | 0.486 k allocs: 19.4 kB |
| Transformed cumulative LogNormal logpdf/Enzyme forward | 0.036 k allocs: 1.11 kB |
| Transformed cumulative LogNormal logpdf/Enzyme reverse | 14 allocs: 0.609 kB |
| Transformed cumulative LogNormal logpdf/ForwardDiff | 7 allocs: 0.266 kB |
| Transformed cumulative LogNormal logpdf/Mooncake forward | 0.058 k allocs: 2.91 kB |
| Transformed cumulative LogNormal logpdf/Mooncake reverse | 0.274 k allocs: 25.6 kB |
| Transformed cumulative LogNormal logpdf/ReverseDiff (tape) | 0.213 k allocs: 9.06 kB |
| Transformed thin LogNormal logpdf/Enzyme forward | 0.036 k allocs: 1.11 kB |
| Transformed thin LogNormal logpdf/Enzyme reverse | 14 allocs: 0.609 kB |
| Transformed thin LogNormal logpdf/ForwardDiff | 7 allocs: 0.266 kB |
| Transformed thin LogNormal logpdf/Mooncake forward | 0.058 k allocs: 2.91 kB |
| Transformed thin LogNormal logpdf/Mooncake reverse | 0.274 k allocs: 25.6 kB |
| Transformed thin LogNormal logpdf/ReverseDiff (tape) | 0.213 k allocs: 9.06 kB |
| Weighted Affine LogNormal nested logpdf/Enzyme forward | 0.036 k allocs: 1.38 kB |
| Weighted Affine LogNormal nested logpdf/Enzyme reverse | 6 allocs: 0.484 kB |
| Weighted Affine LogNormal nested logpdf/ForwardDiff | 7 allocs: 0.516 kB |
| Weighted Affine LogNormal nested logpdf/Mooncake forward | 0.08 k allocs: 4.02 kB |
| Weighted Affine LogNormal nested logpdf/Mooncake reverse | 0.329 k allocs: 15.6 kB |
| Weighted Affine LogNormal nested logpdf/ReverseDiff (tape) | 0.269 k allocs: 11.3 kB |
| Weighted LogNormal observation-time weight logpdf/Enzyme forward | 0.032 k allocs: 1.05 kB |
| Weighted LogNormal observation-time weight logpdf/Enzyme reverse | 10 allocs: 1.14 kB |
| Weighted LogNormal observation-time weight logpdf/ForwardDiff | 7 allocs: 0.297 kB |
| Weighted LogNormal observation-time weight logpdf/Mooncake forward | 0.068 k allocs: 3.59 kB |
| Weighted LogNormal observation-time weight logpdf/Mooncake reverse | 0.32 k allocs: 0.0353 MB |
| Weighted LogNormal observation-time weight logpdf/ReverseDiff (tape) | 0.239 k allocs: 9.97 kB |
| Weighted LogNormal scalar logpdf/Enzyme forward | 0.032 k allocs: 1.05 kB |
| Weighted LogNormal scalar logpdf/Enzyme reverse | 10 allocs: 1.14 kB |
| Weighted LogNormal scalar logpdf/ForwardDiff | 7 allocs: 0.297 kB |
| Weighted LogNormal scalar logpdf/Mooncake forward | 0.068 k allocs: 3.59 kB |
| Weighted LogNormal scalar logpdf/Mooncake reverse | 0.348 k allocs: 0.0453 MB |
| Weighted LogNormal scalar logpdf/ReverseDiff (tape) | 0.239 k allocs: 9.97 kB |
| Weighted Sequential observed-total logpdf/Enzyme forward | 0.668 k allocs: 26 kB |
| Weighted Sequential observed-total logpdf/Enzyme reverse | 2.03 k allocs: 0.0977 MB |
| Weighted Sequential observed-total logpdf/ForwardDiff | 0.198 k allocs: 10.1 kB |
| Weighted Sequential observed-total logpdf/Mooncake forward | 1.65 k allocs: 0.0702 MB |
| Weighted Sequential observed-total logpdf/Mooncake reverse | 8.5 k allocs: 0.854 MB |
| Weighted Sequential observed-total logpdf/ReverseDiff (tape) | 31.3 k allocs: 1.29 MB |
Affine
Time
| Benchmark | 32ea6df784e6a8... |
|---|---|
| LogNormal/ccdf | 3.29 ± 0.37 μs |
| LogNormal/cdf | 3.38 ± 0.33 μs |
| LogNormal/construction | 3.1 ± 0.01 ns |
| LogNormal/logpdf | 2.65 ± 0.33 μs |
| LogNormal/pdf | 4.09 ± 0.23 μs |
| LogNormal/quantile | 0.488 ± 0.017 μs |
| LogNormal/rand | 1.24 ± 0.069 μs |
Memory
| Benchmark | 32ea6df784e6a8... |
|---|---|
| LogNormal/ccdf | 2 allocs: 0.906 kB |
| LogNormal/cdf | 2 allocs: 0.906 kB |
| LogNormal/construction | 0 allocs: 0 B |
| LogNormal/logpdf | 2 allocs: 0.906 kB |
| LogNormal/pdf | 2 allocs: 0.906 kB |
| LogNormal/quantile | 2 allocs: 0.219 kB |
| LogNormal/rand | 2 allocs: 0.906 kB |
Baseline
Time
| Benchmark | 32ea6df784e6a8... |
|---|---|
| LogNormal/ccdf | 2.67 ± 0.32 μs |
| LogNormal/cdf | 2.65 ± 0.34 μs |
| LogNormal/construction | 1.55 ± 0.01 ns |
| LogNormal/logpdf | 1.66 ± 0.29 μs |
| LogNormal/pdf | 2.97 ± 0.32 μs |
| LogNormal/quantile | 0.466 ± 0.018 μs |
| LogNormal/rand | 1.02 ± 0.032 μs |
Memory
| Benchmark | 32ea6df784e6a8... |
|---|---|
| LogNormal/ccdf | 2 allocs: 0.906 kB |
| LogNormal/cdf | 2 allocs: 0.906 kB |
| LogNormal/construction | 0 allocs: 0 B |
| LogNormal/logpdf | 2 allocs: 0.906 kB |
| LogNormal/pdf | 2 allocs: 0.906 kB |
| LogNormal/quantile | 2 allocs: 0.219 kB |
| LogNormal/rand | 2 allocs: 0.906 kB |
Modified
Time
| Benchmark | 32ea6df784e6a8... |
|---|---|
| IdentityLink/ccdf | 7.53 ± 0.025 μs |
| IdentityLink/cdf | 7.18 ± 0.03 μs |
| IdentityLink/construction | 3.41 ± 0.01 ns |
| IdentityLink/logpdf | 10.5 ± 0.06 μs |
| IdentityLink/pdf | 12.7 ± 0.051 μs |
| IdentityLink/quantile | 0.11 ± 0.0002 ms |
| IdentityLink/rand | 0.577 ± 0.015 ms |
| LogLink/ccdf | 5.79 ± 0.057 μs |
| LogLink/cdf | 6.16 ± 0.042 μs |
| LogLink/construction | 2.79 ± 0.01 ns |
| LogLink/logpdf | 8.04 ± 0.033 μs |
| LogLink/pdf | 9.33 ± 0.04 μs |
| LogLink/quantile | 0.917 ± 0.07 μs |
| LogLink/rand | 5.13 ± 0.19 μs |
Memory
| Benchmark | 32ea6df784e6a8... |
|---|---|
| IdentityLink/ccdf | 2 allocs: 0.906 kB |
| IdentityLink/cdf | 2 allocs: 0.906 kB |
| IdentityLink/construction | 0 allocs: 0 B |
| IdentityLink/logpdf | 2 allocs: 0.906 kB |
| IdentityLink/pdf | 2 allocs: 0.906 kB |
| IdentityLink/quantile | 2 allocs: 0.219 kB |
| IdentityLink/rand | 2 allocs: 0.906 kB |
| LogLink/ccdf | 2 allocs: 0.906 kB |
| LogLink/cdf | 2 allocs: 0.906 kB |
| LogLink/construction | 0 allocs: 0 B |
| LogLink/logpdf | 2 allocs: 0.906 kB |
| LogLink/pdf | 2 allocs: 0.906 kB |
| LogLink/quantile | 2 allocs: 0.219 kB |
| LogLink/rand | 2 allocs: 0.906 kB |
Transformed
Time
| Benchmark | 32ea6df784e6a8... |
|---|---|
| cumulative/cdf | 2.65 ± 0.32 μs |
| cumulative/construction | 3.1 ± 0.06 ns |
| cumulative/logpdf | 1.66 ± 0.29 μs |
| cumulative/rand | 1.02 ± 0.031 μs |
| thin/cdf | 2.66 ± 0.33 μs |
| thin/construction | 2.79 ± 0.01 ns |
| thin/logpdf | 1.66 ± 0.31 μs |
| thin/rand | 1.02 ± 0.029 μs |
Memory
| Benchmark | 32ea6df784e6a8... |
|---|---|
| cumulative/cdf | 2 allocs: 0.906 kB |
| cumulative/construction | 0 allocs: 0 B |
| cumulative/logpdf | 2 allocs: 0.906 kB |
| cumulative/rand | 2 allocs: 0.906 kB |
| thin/cdf | 2 allocs: 0.906 kB |
| thin/construction | 0 allocs: 0 B |
| thin/logpdf | 2 allocs: 0.906 kB |
| thin/rand | 2 allocs: 0.906 kB |
Weighted
Time
| Benchmark | 32ea6df784e6a8... |
|---|---|
| Product/construction | 0.294 ± 0.13 μs |
| Product/logpdf | 2.93 ± 0.19 μs |
| scalar/construction | 3.1 ± 0.01 ns |
| scalar/logpdf | 1.71 ± 0.28 μs |
Memory
| Benchmark | 32ea6df784e6a8... |
|---|---|
| Product/construction | 3 allocs: 2.45 kB |
| Product/logpdf | 6 allocs: 2.72 kB |
| scalar/construction | 0 allocs: 0 B |
| scalar/logpdf | 2 allocs: 0.906 kB |
time_to_load
Time
| Benchmark | 32ea6df784e6a8... |
|---|---|
| time_to_load | 0.618 ± 0.011 s |
Memory
| Benchmark | 32ea6df784e6a8... |
|---|---|
| time_to_load | 0.149 k allocs: 11.2 kB |
Per-benchmark timelines
<details> <summary>Show 6 plots</summary>






</details>
About these benchmarks
ModifiedDistributions benchmarks each modifier's hot paths so wrapper overhead is visible and regressions are caught on every pull request.
The suite (benchmark/benchmarks.jl) evaluates construction, logpdf, pdf, cdf/ccdf, quantile and rand for every modifier around the same base LogNormal, with the bare base as the shared baseline floor:
Baseline: the bare base LogNormal.Affine: the change-of-variables paths throughY = scale * X + shift.Weighted: thelogpdfweight paths, scalar and the vectorisedProduct{Weighted}form.Transformed:thinandcumulative, whose forward ops are transparent to every distribution method, so these rows should sit on the baseline.Modified: the hazard modification on both analytic links; the identity-linkquantileandrandexercise the monotone-bisection cdf inversion, the one non-closed-form path.AD gradients:DifferentiationInterface.gradientof everytest/ADFixturesscenario across the ForwardDiff, ReverseDiff, Mooncake and Enzyme backends, sharing the fixtures that drive the AD test suite.
Run the suite locally with task benchmark, or compare against main with task benchmark-compare (see benchmark/README.md). On pull requests the benchmark workflow benchmarks head and base in separate jobs and posts a single comparison comment. Pushes to main and tags append to the performance history shown below.