Skip to content

Performance over time

How ConvolvedDistributions'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.

SuiteMedian ratioTrendStatus
Baseline0.96ok
Convolved1.11⚠ reg
Difference1.25⚠ reg
Product1.0ok
Quantile1.0ok
Timeseries1.44⚠ reg
AD gradientsn/an/a
time_to_load1.0ok

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.

Baseline

Time

Benchmarkv0.3.1v0.3.0v0.2.01f4127a895a19f...
Gamma/cdf2.89 ± 0.24 μs2.89 ± 0.24 μs2.91 ± 0.27 μs2.78 ± 0.24 μs
Gamma/logpdf2.27 ± 0.27 μs2.17 ± 0.29 μs2.28 ± 0.29 μs2.16 ± 0.27 μs
Normal/cdf1.4 ± 0.24 μs1.36 ± 0.25 μs1.4 ± 0.24 μs1.35 ± 0.24 μs
Normal/logpdf0.62 ± 0.29 μs0.629 ± 0.29 μs0.607 ± 0.29 μs0.866 ± 0.02 μs

Memory

Benchmarkv0.3.1v0.3.0v0.2.01f4127a895a19f...
Gamma/cdf2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB
Gamma/logpdf2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB
Normal/cdf2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB
Normal/logpdf2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB

Convolved

Time

Benchmarkv0.3.1v0.3.0v0.2.01f4127a895a19f...
analytic/cdf batched2.3 ± 0.28 μs2.29 ± 0.28 μs2.28 ± 0.3 μs2.29 ± 0.28 μs
analytic/cdf scalar19.2 ± 0.033 ns19.2 ± 0.032 ns19.2 ± 0.053 ns19.2 ± 0.032 ns
analytic/construction3.25 ± 0.006 ns2.62 ± 0.017 ns3.25 ± 0.005 ns3.58 ± 0.006 ns
analytic/logpdf batched0.583 ± 0.089 μs0.594 ± 0.16 μs0.583 ± 0.069 μs0.876 ± 0.024 μs
analytic/logpdf broadcast2.06 ± 0.27 μs2.06 ± 0.29 μs2.06 ± 0.26 μs2.09 ± 0.27 μs
analytic/logpdf scalar18.6 ± 0.057 ns18.5 ± 0.053 ns18.6 ± 0.045 ns18.6 ± 0.087 ns
analytic/mean2.92 ± 0.008 ns2.31 ± 0.059 ns3.35 ± 0.11 ns3.57 ± 0.005 ns
analytic/pdf batched0.612 ± 0.3 μs0.637 ± 0.29 μs0.606 ± 0.29 μs0.889 ± 0.023 μs
analytic/pdf scalar18.9 ± 0.032 ns18.9 ± 0.031 ns18.9 ± 0.028 ns18.9 ± 0.05 ns
analytic/rand1.12 ± 0.22 μs1.11 ± 0.17 μs1.11 ± 0.24 μs1.12 ± 0.037 μs
numeric/cdf batched0.654 ± 0.0057 ms0.657 ± 0.0051 ms0.673 ± 0.0051 ms0.653 ± 0.0058 ms
numeric/cdf scalar14.5 ± 0.074 μs14.2 ± 0.07 μs14.2 ± 0.057 μs14.2 ± 0.23 μs
numeric/construction3.35 ± 0.11 ns2.96 ± 0.099 ns3.58 ± 0.006 ns3.58 ± 0.006 ns
numeric/logpdf batched0.518 ± 0.013 ms0.516 ± 0.0072 ms0.516 ± 0.0065 ms0.517 ± 0.0077 ms
numeric/logpdf broadcast0.903 ± 0.013 ms0.896 ± 0.012 ms0.897 ± 0.011 ms0.9 ± 0.023 ms
numeric/logpdf scalar8.56 ± 0.067 μs8.31 ± 0.15 μs8.31 ± 0.075 μs8.3 ± 0.076 μs
numeric/mean5.84 ± 0.19 ns4.88 ± 0.009 ns6.17 ± 0.011 ns6.17 ± 0.011 ns
numeric/pdf batched0.516 ± 0.011 ms0.516 ± 0.0065 ms0.516 ± 0.0072 ms0.515 ± 0.0066 ms
numeric/pdf scalar8.56 ± 0.099 μs8.3 ± 0.065 μs8.32 ± 0.081 μs8.3 ± 0.075 μs
numeric/rand2.5 ± 0.31 μs2.5 ± 0.3 μs2.49 ± 0.31 μs2.44 ± 0.31 μs

Memory

Benchmarkv0.3.1v0.3.0v0.2.01f4127a895a19f...
analytic/cdf batched2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB
analytic/cdf scalar0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B
analytic/construction0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B
analytic/logpdf batched2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB
analytic/logpdf broadcast2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB
analytic/logpdf scalar0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B
analytic/mean0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B
analytic/pdf batched2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB
analytic/pdf scalar0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B
analytic/rand2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB
numeric/cdf batched24 allocs: 8.32 kB24 allocs: 8.32 kB24 allocs: 8.32 kB24 allocs: 8.32 kB
numeric/cdf scalar3 allocs: 0.172 kB3 allocs: 0.172 kB3 allocs: 0.172 kB3 allocs: 0.172 kB
numeric/construction0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B
numeric/logpdf batched25 allocs: 8.41 kB25 allocs: 8.41 kB25 allocs: 8.41 kB25 allocs: 8.41 kB
numeric/logpdf broadcast0.338 k allocs: 29.8 kB0.338 k allocs: 29.8 kB0.338 k allocs: 29.8 kB0.338 k allocs: 29.8 kB
numeric/logpdf scalar3 allocs: 0.172 kB3 allocs: 0.172 kB3 allocs: 0.172 kB3 allocs: 0.172 kB
numeric/mean0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B
numeric/pdf batched23 allocs: 7.5 kB23 allocs: 7.5 kB23 allocs: 7.5 kB23 allocs: 7.5 kB
numeric/pdf scalar3 allocs: 0.172 kB3 allocs: 0.172 kB3 allocs: 0.172 kB3 allocs: 0.172 kB
numeric/rand2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB

Difference

Time

Benchmarkv0.3.1v0.3.0v0.2.01f4127a895a19f...
analytic/cdf broadcast3.12 ± 0.31 μs3.11 ± 0.31 μs3.09 ± 0.27 μs3.26 ± 0.3 μs
analytic/cdf scalar10.9 ± 0.025 ns10.5 ± 0.035 ns10.6 ± 0.018 ns10.5 ± 0.023 ns
analytic/construction2.61 ± 0.005 ns2.94 ± 0.097 ns2.61 ± 0.005 ns3.28 ± 0.11 ns
analytic/logpdf broadcast1.31 ± 0.26 μs1.29 ± 0.25 μs1.29 ± 0.25 μs1.38 ± 0.25 μs
analytic/logpdf scalar12.8 ± 0.025 ns12.9 ± 0.41 ns12.9 ± 0.033 ns12.9 ± 0.034 ns
analytic/mean2.29 ± 0.005 ns2.3 ± 0.075 ns2.93 ± 0.005 ns2.92 ± 0.012 ns
analytic/rand1.07 ± 0.28 μs0.945 ± 0.28 μs0.936 ± 0.28 μs1.13 ± 0.044 μs
numeric/cdf broadcast1.27 ± 0.02 ms1.27 ± 0.017 ms1.27 ± 0.018 ms1.28 ± 0.034 ms
numeric/cdf scalar18.2 ± 0.15 μs18.2 ± 0.09 μs18 ± 0.17 μs18 ± 0.6 μs
numeric/construction2.61 ± 0.012 ns2.61 ± 0.006 ns2.95 ± 0.032 ns3.25 ± 0.026 ns
numeric/logpdf broadcast1.12 ± 0.02 ms1.11 ± 0.019 ms1.11 ± 0.02 ms1.11 ± 0.028 ms
numeric/logpdf scalar11.3 ± 0.083 μs11.2 ± 0.37 μs11.1 ± 0.12 μs11.2 ± 0.36 μs
numeric/mean4.88 ± 0.008 ns5.2 ± 0.34 ns4.88 ± 0.01 ns5.84 ± 0.01 ns
numeric/rand2.53 ± 0.3 μs2.48 ± 0.36 μs2.52 ± 0.28 μs2.5 ± 0.31 μs

Memory

Benchmarkv0.3.1v0.3.0v0.2.01f4127a895a19f...
analytic/cdf broadcast2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB
analytic/cdf scalar0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B
analytic/construction0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B
analytic/logpdf broadcast2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB
analytic/logpdf scalar0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B
analytic/mean0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B
analytic/rand2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB
numeric/cdf broadcast0.402 k allocs: 0.0467 MB0.402 k allocs: 0.0467 MB0.402 k allocs: 0.0467 MB0.402 k allocs: 0.0467 MB
numeric/cdf scalar4 allocs: 0.469 kB4 allocs: 0.469 kB4 allocs: 0.469 kB4 allocs: 0.469 kB
numeric/construction0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B
numeric/logpdf broadcast0.402 k allocs: 0.0467 MB0.402 k allocs: 0.0467 MB0.402 k allocs: 0.0467 MB0.402 k allocs: 0.0467 MB
numeric/logpdf scalar4 allocs: 0.469 kB4 allocs: 0.469 kB4 allocs: 0.469 kB4 allocs: 0.469 kB
numeric/mean0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B
numeric/rand2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB

Product

Time

Benchmarkv0.3.1v0.3.0v0.2.01f4127a895a19f...
analytic/cdf broadcast4.27 ± 0.19 μs4.35 ± 0.2 μs4.3 ± 0.21 μs4.28 ± 0.18 μs
analytic/cdf scalar20.4 ± 0.047 ns20.5 ± 0.061 ns20.4 ± 0.057 ns20.5 ± 0.66 ns
analytic/construction2.61 ± 0.008 ns2.61 ± 0.007 ns2.62 ± 0.32 ns3.25 ± 0.027 ns
analytic/logpdf broadcast1.68 ± 0.24 μs1.67 ± 0.24 μs1.67 ± 0.21 μs1.69 ± 0.25 μs
analytic/logpdf scalar15.8 ± 0.025 ns15.8 ± 0.53 ns15.8 ± 0.026 ns15.8 ± 0.023 ns
analytic/mean9.07 ± 0.65 ns7.88 ± 0.029 ns8.11 ± 0.014 ns8.75 ± 0.016 ns
analytic/rand3.83 ± 0.31 μs3.87 ± 0.32 μs3.82 ± 0.31 μs3.82 ± 0.31 μs
numeric/cdf broadcast1.42 ± 0.021 ms1.41 ± 0.019 ms1.41 ± 0.021 ms1.42 ± 0.038 ms
numeric/cdf scalar17.1 ± 0.12 μs17 ± 0.091 μs17 ± 0.095 μs17.1 ± 0.57 μs
numeric/construction2.94 ± 0.009 ns2.61 ± 0.006 ns2.61 ± 0.086 ns3.59 ± 0.12 ns
numeric/logpdf broadcast1.57 ± 0.019 ms1.19 ± 0.018 ms1.19 ± 0.015 ms1.2 ± 0.026 ms
numeric/logpdf scalar12 ± 0.086 μs11.8 ± 0.11 μs11.8 ± 0.082 μs11.8 ± 0.11 μs
numeric/mean4.77 ± 0.16 ns4.77 ± 0.15 ns4.89 ± 0.32 ns6.04 ± 0.32 ns
numeric/rand2.55 ± 0.33 μs2.54 ± 0.29 μs2.53 ± 0.28 μs2.49 ± 0.31 μs

Memory

Benchmarkv0.3.1v0.3.0v0.2.01f4127a895a19f...
analytic/cdf broadcast2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB
analytic/cdf scalar0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B
analytic/construction0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B
analytic/logpdf broadcast2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB
analytic/logpdf scalar0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B
analytic/mean0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B
analytic/rand2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB
numeric/cdf broadcast0.402 k allocs: 0.0467 MB0.402 k allocs: 0.0467 MB0.402 k allocs: 0.0467 MB0.402 k allocs: 0.0467 MB
numeric/cdf scalar4 allocs: 0.469 kB4 allocs: 0.469 kB4 allocs: 0.469 kB4 allocs: 0.469 kB
numeric/construction0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B
numeric/logpdf broadcast0.402 k allocs: 0.0467 MB0.402 k allocs: 0.0467 MB0.402 k allocs: 0.0467 MB0.402 k allocs: 0.0467 MB
numeric/logpdf scalar4 allocs: 0.469 kB4 allocs: 0.469 kB4 allocs: 0.469 kB4 allocs: 0.469 kB
numeric/mean0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B0 allocs: 0 B
numeric/rand2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB2 allocs: 0.906 kB

Quantile

Time

Benchmarkv0.3.1v0.3.0v0.2.01f4127a895a19f...
Convolved analytic/grid0.514 ± 0.023 ms0.509 ± 0.025 ms0.508 ± 0.02 ms0.583 ± 0.039 ms
Convolved analytic/median23.7 ± 3.8 μs23.6 ± 3.7 μs23.6 ± 3.7 μs23.5 ± 0.74 μs
Convolved numeric/median0.275 ± 0.0076 ms0.271 ± 0.0073 ms0.271 ± 0.0071 ms0.269 ± 0.0068 ms
Difference numeric/median0.313 ± 0.008 ms0.313 ± 0.0078 ms0.357 ± 0.0071 ms0.359 ± 0.011 ms
Product numeric/median0.368 ± 0.01 ms0.368 ± 0.0084 ms0.369 ± 0.0084 ms0.368 ± 0.0077 ms

Memory

Benchmarkv0.3.1v0.3.0v0.2.01f4127a895a19f...
Convolved analytic/grid6.03 k allocs: 0.353 MB6.03 k allocs: 0.353 MB6.03 k allocs: 0.353 MB6.03 k allocs: 0.353 MB
Convolved analytic/median0.281 k allocs: 17.1 kB0.281 k allocs: 17.1 kB0.281 k allocs: 17.1 kB0.281 k allocs: 17.1 kB
Convolved numeric/median0.355 k allocs: 21.1 kB0.355 k allocs: 21.1 kB0.355 k allocs: 21.1 kB0.355 k allocs: 21.1 kB
Difference numeric/median0.318 k allocs: 23.2 kB0.318 k allocs: 23.2 kB0.318 k allocs: 23.2 kB0.318 k allocs: 23.2 kB
Product numeric/median0.397 k allocs: 28.4 kB0.397 k allocs: 28.4 kB0.397 k allocs: 28.4 kB0.397 k allocs: 28.4 kB

Timeseries

Time

Benchmarkv0.3.1v0.3.0v0.2.01f4127a895a19f...
Convolved delay0.2 ± 0.09 μs0.205 ± 0.088 μs0.2 ± 0.089 μs0.288 ± 0.0095 μs
Gamma delay0.198 ± 0.087 μs0.198 ± 0.087 μs0.201 ± 0.087 μs0.288 ± 0.0093 μs
Poisson delay1.14 ± 0.045 μs1.15 ± 0.058 μs1.14 ± 0.052 μs1.16 ± 0.055 μs

Memory

Benchmarkv0.3.1v0.3.0v0.2.01f4127a895a19f...
Convolved delay2 allocs: 0.297 kB2 allocs: 0.297 kB2 allocs: 0.297 kB2 allocs: 0.297 kB
Gamma delay2 allocs: 0.297 kB2 allocs: 0.297 kB2 allocs: 0.297 kB2 allocs: 0.297 kB
Poisson delay4 allocs: 0.594 kB4 allocs: 0.594 kB4 allocs: 0.594 kB4 allocs: 0.594 kB

AD gradients

Time

Benchmarkv0.3.1v0.3.0v0.2.01f4127a895a19f...
Product Gamma*LogNormal mean+var moments/Enzyme forward6.2 ± 0.15 μs
Difference Normal-Normal analytical/ForwardDiff0.521 ± 0.06 μs
Convolved Gamma+LogNormal numerical/ReverseDiff (tape)2.18 ± 0.16 ms
Convolved Normal+Normal analytical/ReverseDiff (tape)15.2 ± 0.74 μs
Difference LogNormal-Gamma numerical wrt Y/Enzyme reverse0.19 ± 0.007 ms
Timeseries convolve time-varying Poisson delays/Enzyme reverse8.92 ± 0.42 μs
pgf Poisson closed form wrt rate/Enzyme reverse0.0406 ± 0.018 μs
Convolved Gamma+LogNormal numerical/Enzyme reverse0.101 ± 0.0042 ms
Timeseries convolve discrete Poisson delay/ForwardDiff0.801 ± 0.11 μs
Convolved Normal+Normal analytical/Mooncake forward5.07 ± 0.43 μs
Product Gamma*LogNormal mean+var moments/Mooncake forward4.86 ± 0.41 μs
Convolved Gamma+LogNormal numerical/ForwardDiff0.0558 ± 0.00017 ms
Convolved Normal+Normal analytical/Mooncake reverse22.8 ± 2.8 μs
Convolved LogNormal+Gamma numerical/ReverseDiff (tape)2.13 ± 0.17 ms
Difference Gamma-Normal mean+var moments/Enzyme reverse0.0393 ± 0.011 μs
Convolved Gamma+LogNormal batched logpdf wrt points/ForwardDiff0.0516 ± 0.0013 ms
Difference Gamma-LogNormal numerical wrt X/Mooncake reverse0.725 ± 0.029 ms
Difference Gamma-LogNormal numerical wrt X/Mooncake forward0.42 ± 0.0067 ms
Convolved Normal+Normal analytical/ForwardDiff0.535 ± 0.059 μs
Timeseries convolve time-varying PMF matrix/Enzyme reverse9.5 ± 0.51 μs
Timeseries convolve time-varying PMF matrix/Mooncake forward6.87 ± 0.7 μs
Convolved LogNormal+Gamma numerical/Mooncake reverse0.509 ± 0.034 ms
Difference LogNormal-Gamma numerical wrt Y/ReverseDiff (tape)3.72 ± 0.29 ms
Product Gamma*LogNormal mean+var moments/Mooncake reverse5.76 ± 0.76 μs
Timeseries convolve time-varying Poisson delays/ForwardDiff2.3 ± 0.29 μs
Timeseries convolve time-varying PMF matrix/ForwardDiff0.914 ± 0.12 μs
Convolved Gamma+Normal mean+var moments/ReverseDiff (tape)2.41 ± 0.14 μs
Difference Normal-Normal analytical/Enzyme forward7.04 ± 0.074 μs
Convolved Gamma+Normal mean+var moments/Enzyme reverse0.0392 ± 0.011 μs
Difference LogNormal-Gamma numerical wrt Y/Mooncake forward0.537 ± 0.0058 ms
Convolved Normal+Normal analytical/Enzyme reverse3.13 ± 0.096 μs
Product Gamma*LogNormal mean+var moments/ReverseDiff (tape)10 ± 0.49 μs
Convolved Gamma+LogNormal numerical/Mooncake reverse0.481 ± 0.033 ms
Convolved Gamma+LogNormal batched logpdf wrt params/Enzyme reverse0.445 ± 0.023 ms
Difference Normal-Normal analytical/ReverseDiff (tape)16.3 ± 0.83 μs
Difference Normal-Normal analytical/Mooncake forward4.91 ± 0.42 μs
Product LogNormal*Gamma numerical wrt Y/Mooncake forward0.557 ± 0.0062 ms
Difference Gamma-LogNormal numerical wrt X/ForwardDiff0.0974 ± 0.00067 ms
pgf Poisson closed form wrt rate/ForwardDiff0.357 ± 0.056 μs
Timeseries convolve discrete Poisson delay/Enzyme reverse1 ± 0.13 μs
Difference Gamma-Normal mean+var moments/Enzyme forward6.19 ± 0.12 μs
Difference LogNormal-Gamma numerical wrt Y/Enzyme forward0.121 ± 0.001 ms
Product Gamma*LogNormal numerical wrt X/Enzyme reverse0.172 ± 0.0066 ms
Convolved Gamma+LogNormal batched logpdf wrt points/Enzyme forward0.0672 ± 0.0029 ms
Difference Gamma-LogNormal numerical wrt X/Enzyme forward0.0948 ± 0.00087 ms
Timeseries convolve time-varying Poisson delays/ReverseDiff (tape)0.0613 ± 0.0083 ms
Difference Normal-Normal analytical/Mooncake reverse22.9 ± 2.9 μs
Convolved Gamma+LogNormal batched logpdf wrt points/Mooncake reverse0.522 ± 0.032 ms
Product LogNormal*LogNormal analytical/Mooncake forward5.05 ± 0.41 μs
Product LogNormal*Gamma numerical wrt Y/Enzyme forward0.124 ± 0.0017 ms
Convolved LogNormal+Gamma numerical/Enzyme reverse0.117 ± 0.0044 ms
Difference Gamma-Normal mean+var moments/Mooncake forward4.52 ± 0.42 μs
Difference Gamma-Normal mean+var moments/Mooncake reverse4.07 ± 0.26 μs
pgf Poisson closed form wrt rate/Mooncake forward4.13 ± 0.46 μs
Timeseries convolve discrete Poisson delay/Enzyme forward6.22 ± 0.2 μs
Difference Gamma-LogNormal numerical wrt X/Enzyme reverse0.166 ± 0.0064 ms
pgf Poisson closed form wrt rate/Enzyme forward5.85 ± 0.16 μs
Convolved Gamma+LogNormal batched logpdf wrt params/ReverseDiff (tape)1.98 ± 0.18 ms
Product Gamma*LogNormal numerical wrt X/Mooncake reverse0.762 ± 0.034 ms
Product Gamma*LogNormal numerical wrt X/Enzyme forward0.0993 ± 0.001 ms
Product LogNormal*Gamma numerical wrt Y/Enzyme reverse0.203 ± 0.007 ms
Difference LogNormal-Gamma numerical wrt Y/Mooncake reverse0.781 ± 0.038 ms
Convolved Gamma+LogNormal batched logpdf wrt points/Mooncake forward0.437 ± 0.0075 ms
Convolved Gamma+LogNormal numerical/Enzyme forward0.0585 ± 0.00038 ms
Product LogNormal*Gamma numerical wrt Y/ReverseDiff (tape)4.17 ± 0.3 ms
Product LogNormal*Gamma numerical wrt Y/ForwardDiff0.117 ± 0.00065 ms
Timeseries convolve discrete Poisson delay/Mooncake forward5.43 ± 0.51 μs
pgf Poisson closed form wrt rate/Mooncake reverse3.64 ± 0.13 μs
Product LogNormal*LogNormal analytical/Mooncake reverse14.6 ± 0.94 μs
Product Gamma*LogNormal mean+var moments/ForwardDiff0.529 ± 0.038 μs
Timeseries convolve time-varying PMF matrix/Enzyme forward6.36 ± 0.16 μs
Product LogNormal*LogNormal analytical/Enzyme reverse3.1 ± 0.099 μs
Convolved Gamma+LogNormal batched logpdf wrt params/Mooncake forward0.207 ± 0.0044 ms
pgf Poisson closed form wrt rate/ReverseDiff (tape)0.509 ± 0.19 μs
Difference Gamma-Normal mean+var moments/ReverseDiff (tape)2.41 ± 0.13 μs
Convolved LogNormal+Gamma numerical/ForwardDiff0.0702 ± 0.00029 ms
Product LogNormal*LogNormal analytical/ReverseDiff (tape)19.5 ± 1 μs
Timeseries convolve time-varying Poisson delays/Mooncake reverse0.0739 ± 0.0076 ms
Convolved Normal+Normal analytical/Enzyme forward7.08 ± 0.062 μs
Convolved Gamma+Normal mean+var moments/ForwardDiff0.478 ± 0.035 μs
Convolved Gamma+LogNormal batched logpdf wrt points/ReverseDiff (tape)2.23 ± 0.18 ms
Product Gamma*LogNormal numerical wrt X/ReverseDiff (tape)4.17 ± 0.28 ms
Timeseries convolve time-varying Poisson delays/Enzyme forward8.33 ± 0.39 μs
Difference LogNormal-Gamma numerical wrt Y/ForwardDiff0.116 ± 0.00052 ms
Timeseries convolve time-varying PMF matrix/Mooncake reverse0.0328 ± 0.0063 ms
Convolved LogNormal+Gamma numerical/Enzyme forward0.0771 ± 0.00073 ms
Timeseries convolve discrete Poisson delay/ReverseDiff (tape)27.3 ± 0.93 μs
Product LogNormal*LogNormal analytical/ForwardDiff0.495 ± 0.057 μs
Convolved Gamma+Normal mean+var moments/Mooncake reverse4.03 ± 0.27 μs
Product LogNormal*Gamma numerical wrt Y/Mooncake reverse0.814 ± 0.035 ms
Timeseries convolve discrete Poisson delay/Mooncake reverse15 ± 0.86 μs
Product Gamma*LogNormal numerical wrt X/Mooncake forward0.439 ± 0.0066 ms
Timeseries convolve time-varying PMF matrix/ReverseDiff (tape)15.8 ± 0.7 μs
Product Gamma*LogNormal mean+var moments/Enzyme reverse0.0546 ± 0.011 μs
Convolved Gamma+LogNormal batched logpdf wrt points/Enzyme reverse0.45 ± 0.024 ms
Convolved Gamma+LogNormal batched logpdf wrt params/Enzyme forward0.0519 ± 0.0019 ms
Product Gamma*LogNormal numerical wrt X/ForwardDiff0.0979 ± 0.00046 ms
Convolved Gamma+LogNormal batched logpdf wrt params/ForwardDiff0.0405 ± 0.00073 ms
Convolved Gamma+LogNormal batched logpdf wrt params/Mooncake reverse0.522 ± 0.033 ms
Difference Gamma-LogNormal numerical wrt X/ReverseDiff (tape)3.75 ± 0.33 ms
Difference Gamma-Normal mean+var moments/ForwardDiff0.483 ± 0.035 μs
Convolved Gamma+Normal mean+var moments/Mooncake forward4.54 ± 0.45 μs
Difference Normal-Normal analytical/Enzyme reverse3.04 ± 0.096 μs
Convolved Gamma+LogNormal numerical/Mooncake forward0.236 ± 0.0056 ms
Product LogNormal*LogNormal analytical/Enzyme forward7.09 ± 0.086 μs
Convolved LogNormal+Gamma numerical/Mooncake forward0.314 ± 0.0062 ms
Convolved Gamma+Normal mean+var moments/Enzyme forward6.21 ± 0.21 μs
Timeseries convolve time-varying Poisson delays/Mooncake forward16 ± 0.75 μs

Memory

Benchmarkv0.3.1v0.3.0v0.2.01f4127a895a19f...
Product Gamma*LogNormal mean+var moments/Enzyme forward0.032 k allocs: 1.3 kB
Difference Normal-Normal analytical/ForwardDiff7 allocs: 0.266 kB
Convolved Gamma+LogNormal numerical/ReverseDiff (tape)31.1 k allocs: 1.29 MB
Convolved Normal+Normal analytical/ReverseDiff (tape)0.238 k allocs: 9.92 kB
Difference LogNormal-Gamma numerical wrt Y/Enzyme reverse0.159 k allocs: 23.2 kB
Timeseries convolve time-varying Poisson delays/Enzyme reverse0.104 k allocs: 5.53 kB
pgf Poisson closed form wrt rate/Enzyme reverse2 allocs: 0.0625 kB
Convolved Gamma+LogNormal numerical/Enzyme reverse0.147 k allocs: 18.8 kB
Timeseries convolve discrete Poisson delay/ForwardDiff11 allocs: 0.547 kB
Convolved Normal+Normal analytical/Mooncake forward0.058 k allocs: 2.91 kB
Product Gamma*LogNormal mean+var moments/Mooncake forward0.07 k allocs: 3.33 kB
Convolved Gamma+LogNormal numerical/ForwardDiff21 allocs: 1.03 kB
Convolved Normal+Normal analytical/Mooncake reverse0.289 k allocs: 0.0329 MB
Convolved LogNormal+Gamma numerical/ReverseDiff (tape)30.2 k allocs: 1.26 MB
Difference Gamma-Normal mean+var moments/Enzyme reverse2 allocs: 0.0938 kB
Convolved Gamma+LogNormal batched logpdf wrt points/ForwardDiff0.081 k allocs: 7.2 kB
Difference Gamma-LogNormal numerical wrt X/Mooncake reverse2.46 k allocs: 1.03 MB
Difference Gamma-LogNormal numerical wrt X/Mooncake forward0.178 k allocs: 17 kB
Convolved Normal+Normal analytical/ForwardDiff7 allocs: 0.266 kB
Timeseries convolve time-varying PMF matrix/Enzyme reverse0.13 k allocs: 6.89 kB
Timeseries convolve time-varying PMF matrix/Mooncake forward0.088 k allocs: 5.52 kB
Convolved LogNormal+Gamma numerical/Mooncake reverse2.37 k allocs: 0.633 MB
Difference LogNormal-Gamma numerical wrt Y/ReverseDiff (tape)0.0532 M allocs: 2.07 MB
Product Gamma*LogNormal mean+var moments/Mooncake reverse0.093 k allocs: 5.09 kB
Timeseries convolve time-varying Poisson delays/ForwardDiff0.037 k allocs: 2.44 kB
Timeseries convolve time-varying PMF matrix/ForwardDiff16 allocs: 1.14 kB
Convolved Gamma+Normal mean+var moments/ReverseDiff (tape)0.041 k allocs: 1.7 kB
Difference Normal-Normal analytical/Enzyme forward0.036 k allocs: 1.11 kB
Convolved Gamma+Normal mean+var moments/Enzyme reverse2 allocs: 0.0938 kB
Difference LogNormal-Gamma numerical wrt Y/Mooncake forward0.178 k allocs: 17 kB
Convolved Normal+Normal analytical/Enzyme reverse24 allocs: 1.03 kB
Product Gamma*LogNormal mean+var moments/ReverseDiff (tape)0.127 k allocs: 5.25 kB
Convolved Gamma+LogNormal numerical/Mooncake reverse2.35 k allocs: 0.639 MB
Convolved Gamma+LogNormal batched logpdf wrt params/Enzyme reverse1.35 k allocs: 0.168 MB
Difference Normal-Normal analytical/ReverseDiff (tape)0.268 k allocs: 10.9 kB
Difference Normal-Normal analytical/Mooncake forward0.058 k allocs: 2.91 kB
Product LogNormal*Gamma numerical wrt Y/Mooncake forward0.178 k allocs: 17 kB
Difference Gamma-LogNormal numerical wrt X/ForwardDiff27 allocs: 2.61 kB
pgf Poisson closed form wrt rate/ForwardDiff7 allocs: 0.203 kB
Timeseries convolve discrete Poisson delay/Enzyme reverse10 allocs: 0.5 kB
Difference Gamma-Normal mean+var moments/Enzyme forward0.032 k allocs: 1.3 kB
Difference LogNormal-Gamma numerical wrt Y/Enzyme forward0.096 k allocs: 8.14 kB
Product Gamma*LogNormal numerical wrt X/Enzyme reverse0.159 k allocs: 23.1 kB
Convolved Gamma+LogNormal batched logpdf wrt points/Enzyme forward0.151 k allocs: 22.6 kB
Difference Gamma-LogNormal numerical wrt X/Enzyme forward0.096 k allocs: 8.14 kB
Timeseries convolve time-varying Poisson delays/ReverseDiff (tape)1.02 k allocs: 0.0418 MB
Difference Normal-Normal analytical/Mooncake reverse0.289 k allocs: 0.0331 MB
Convolved Gamma+LogNormal batched logpdf wrt points/Mooncake reverse2.07 k allocs: 0.665 MB
Product LogNormal*LogNormal analytical/Mooncake forward0.058 k allocs: 2.91 kB
Product LogNormal*Gamma numerical wrt Y/Enzyme forward0.096 k allocs: 8.14 kB
Convolved LogNormal+Gamma numerical/Enzyme reverse0.147 k allocs: 18.8 kB
Difference Gamma-Normal mean+var moments/Mooncake forward0.07 k allocs: 3.33 kB
Difference Gamma-Normal mean+var moments/Mooncake reverse0.078 k allocs: 3.71 kB
pgf Poisson closed form wrt rate/Mooncake forward0.052 k allocs: 2.69 kB
Timeseries convolve discrete Poisson delay/Enzyme forward0.033 k allocs: 1.2 kB
Difference Gamma-LogNormal numerical wrt X/Enzyme reverse0.159 k allocs: 23.1 kB
pgf Poisson closed form wrt rate/Enzyme forward25 allocs: 0.766 kB
Convolved Gamma+LogNormal batched logpdf wrt params/ReverseDiff (tape)28.5 k allocs: 1.2 MB
Product Gamma*LogNormal numerical wrt X/Mooncake reverse2.57 k allocs: 1.15 MB
Product Gamma*LogNormal numerical wrt X/Enzyme forward0.096 k allocs: 8.14 kB
Product LogNormal*Gamma numerical wrt Y/Enzyme reverse0.159 k allocs: 23.2 kB
Difference LogNormal-Gamma numerical wrt Y/Mooncake reverse2.46 k allocs: 1.03 MB
Convolved Gamma+LogNormal batched logpdf wrt points/Mooncake forward0.519 k allocs: 0.0521 MB
Convolved Gamma+LogNormal numerical/Enzyme forward0.078 k allocs: 3.41 kB
Product LogNormal*Gamma numerical wrt Y/ReverseDiff (tape)0.058 M allocs: 2.44 MB
Product LogNormal*Gamma numerical wrt Y/ForwardDiff27 allocs: 2.61 kB
Timeseries convolve discrete Poisson delay/Mooncake forward0.068 k allocs: 3.58 kB
pgf Poisson closed form wrt rate/Mooncake reverse0.057 k allocs: 2.52 kB
Product LogNormal*LogNormal analytical/Mooncake reverse0.27 k allocs: 12.5 kB
Product Gamma*LogNormal mean+var moments/ForwardDiff7 allocs: 0.484 kB
Timeseries convolve time-varying PMF matrix/Enzyme forward0.043 k allocs: 2.17 kB
Product LogNormal*LogNormal analytical/Enzyme reverse24 allocs: 1.02 kB
Convolved Gamma+LogNormal batched logpdf wrt params/Mooncake forward0.264 k allocs: 27.2 kB
pgf Poisson closed form wrt rate/ReverseDiff (tape)18 allocs: 0.609 kB
Difference Gamma-Normal mean+var moments/ReverseDiff (tape)0.041 k allocs: 1.7 kB
Convolved LogNormal+Gamma numerical/ForwardDiff21 allocs: 1.03 kB
Product LogNormal*LogNormal analytical/ReverseDiff (tape)0.298 k allocs: 12 kB
Timeseries convolve time-varying Poisson delays/Mooncake reverse0.865 k allocs: 0.0638 MB
Convolved Normal+Normal analytical/Enzyme forward0.036 k allocs: 1.11 kB
Convolved Gamma+Normal mean+var moments/ForwardDiff7 allocs: 0.484 kB
Convolved Gamma+LogNormal batched logpdf wrt points/ReverseDiff (tape)0.0327 M allocs: 1.23 MB
Product Gamma*LogNormal numerical wrt X/ReverseDiff (tape)0.058 M allocs: 2.44 MB
Timeseries convolve time-varying Poisson delays/Enzyme forward0.102 k allocs: 4.61 kB
Difference LogNormal-Gamma numerical wrt Y/ForwardDiff27 allocs: 2.61 kB
Timeseries convolve time-varying PMF matrix/Mooncake reverse0.345 k allocs: 28.9 kB
Convolved LogNormal+Gamma numerical/Enzyme forward0.078 k allocs: 3.41 kB
Timeseries convolve discrete Poisson delay/ReverseDiff (tape)0.462 k allocs: 18.2 kB
Product LogNormal*LogNormal analytical/ForwardDiff7 allocs: 0.266 kB
Convolved Gamma+Normal mean+var moments/Mooncake reverse0.078 k allocs: 3.71 kB
Product LogNormal*Gamma numerical wrt Y/Mooncake reverse2.57 k allocs: 1.15 MB
Timeseries convolve discrete Poisson delay/Mooncake reverse0.198 k allocs: 16.1 kB
Product Gamma*LogNormal numerical wrt X/Mooncake forward0.178 k allocs: 17 kB
Timeseries convolve time-varying PMF matrix/ReverseDiff (tape)0.273 k allocs: 12.2 kB
Product Gamma*LogNormal mean+var moments/Enzyme reverse2 allocs: 0.0938 kB
Convolved Gamma+LogNormal batched logpdf wrt points/Enzyme reverse1.36 k allocs: 0.169 MB
Convolved Gamma+LogNormal batched logpdf wrt params/Enzyme forward0.088 k allocs: 11.6 kB
Product Gamma*LogNormal numerical wrt X/ForwardDiff27 allocs: 2.61 kB
Convolved Gamma+LogNormal batched logpdf wrt params/ForwardDiff0.04 k allocs: 4.7 kB
Convolved Gamma+LogNormal batched logpdf wrt params/Mooncake reverse2.08 k allocs: 0.666 MB
Difference Gamma-LogNormal numerical wrt X/ReverseDiff (tape)0.0532 M allocs: 2.07 MB
Difference Gamma-Normal mean+var moments/ForwardDiff7 allocs: 0.484 kB
Convolved Gamma+Normal mean+var moments/Mooncake forward0.07 k allocs: 3.33 kB
Difference Normal-Normal analytical/Enzyme reverse24 allocs: 1.02 kB
Convolved Gamma+LogNormal numerical/Mooncake forward0.142 k allocs: 7.5 kB
Product LogNormal*LogNormal analytical/Enzyme forward0.036 k allocs: 1.11 kB
Convolved LogNormal+Gamma numerical/Mooncake forward0.142 k allocs: 7.5 kB
Convolved Gamma+Normal mean+var moments/Enzyme forward0.032 k allocs: 1.3 kB
Timeseries convolve time-varying Poisson delays/Mooncake forward0.238 k allocs: 11.6 kB

time_to_load

Time

Benchmarkv0.3.1v0.3.0v0.2.01f4127a895a19f...
time_to_load0.889 ± 0.0073 s0.889 ± 0.0066 s0.879 ± 0.0041 s0.885 ± 0.0072 s

Memory

Benchmarkv0.3.1v0.3.0v0.2.01f4127a895a19f...
time_to_load0.149 k allocs: 11.2 kB0.149 k allocs: 11.2 kB0.149 k allocs: 11.2 kB0.149 k allocs: 11.2 kB

Per-benchmark timelines

<details> <summary>Show 4 plots</summary>

plot_ConvolvedDistributions_1.pngplot_ConvolvedDistributions_2.pngplot_ConvolvedDistributions_3.pngplot_ConvolvedDistributions_4.png

</details>

About these benchmarks

Benchmarks for the convolution distributions, reading the analytic and numeric quadrature backends against the bare component distributions.

Quick start

Install the benchpkg CLI once:

bash
task benchmark-install
# Or: julia -e 'using Pkg; Pkg.add("AirspeedVelocity")'

then run the suite:

bash
# Benchmark current state
task benchmark

# Compare main branch vs current state
task benchmark-compare

# Filter to specific benchmarks
task benchmark -- --filter=Convolved
task benchmark-compare -- --filter=Quantile

Benchmark structure

Baseline/
  Gamma/               (logpdf, cdf)
  Normal/              (logpdf, cdf)

Convolved/
  analytic/            (construction, logpdf/pdf/cdf scalar,
                        logpdf broadcast, logpdf/pdf/cdf batched,
                        rand, mean)
  numeric/             (same operations)

Difference/
  analytic/            (construction, logpdf/cdf scalar,
                        logpdf/cdf broadcast, rand, mean)
  numeric/             (same operations)

Product/
  analytic/            (construction, logpdf/cdf scalar,
                        logpdf/cdf broadcast, rand, mean)
  numeric/             (same operations)

Ratio/
  analytic/            (construction, logpdf/cdf scalar,
                        logpdf/cdf broadcast, rand, mean)
  numeric/             (construction, logpdf/cdf scalar,
                        logpdf/cdf broadcast, rand -- no mean row:
                        the numeric pair has no closed-form moment)

Timeseries/
  Gamma delay          (convolve_series(pmf, series), pmf precomputed)
  Convolved delay
  Poisson delay        (discrete: convolve_series(delay, series))

Quantile/
  Convolved analytic/  (median, grid)
  Convolved numeric/   (median)
  Difference numeric/  (median)
  Product numeric/     (median)

AD gradients/
  <every test/ADFixtures scenario>/
    ForwardDiff, ReverseDiff (tape), Enzyme forward, Enzyme reverse,
    Mooncake forward, Mooncake reverse

Analytic vs numeric

convolved, difference, product, and ratio use a closed form where one exists (Normal + Normal, equal-scale Gamma, equal-rate Exponential; Normal - Normal; LogNormal * LogNormal; zero-mean Normal / Normal, Gamma / Gamma, Chisq / Chisq) and AD-safe Gauss-Legendre quadrature otherwise. The analytic rows should sit near the Baseline floor; the gap between the numeric rows and their analytic counterparts is the cost of the quadrature backend. The batched rows share the composite quadrature grid across evaluation points; their gap to the logpdf broadcast row over the same points is the headline batching win. Pass method = NumericSolver() to force the numeric path.

CI integration

Pull requests benchmark head and base in separate jobs via the benchmark workflow and post a single comparison comment. Pushes to main and tagged releases append to the performance history below.