BENCHMARKS

Benchmarks.

How Latte's INLA fits compare on the same models, against an identical likelihood and prior — so the only difference is the approximation. Accuracy is the KS distance between the two engines' marginals (0 = identical, reported max / median per block); speed is warm-fit wall-clock (cold includes Julia's first-run compilation). Every figure links to a runnable script in benchmark/, versions and hardware recorded.

Comparison against R-INLA

REFERENCE COMPARISON · WARM FIT

Accuracy against wall-clock.

each point is one model · vs R-INLA on the same posterior

KS < 0.0510×30×100×300×warm speedup vs R-INLA (log) →0.000.050.10KS vs R-INLA · lower = closerseeds · 578×scotland · 185×nhtemp · 46.2×tokyo · 17.9×epil · 14.2×spdetoy · 1.4×paraná · 2.9×

Dot = median KS of the latent marginals; whisker reaches the worst single component. Large speedups at small n partly reflect R-INLA's fixed per-call overhead, not raw compute. Paraná's SPDE field sits above the band — weakly identified (variance- not mean-limited), a floor both engines hit. Full per-component numbers in the receipts below.

Crowder seeds
Binomial GLMM · IID plate
Latte INLA · warm5 msR-INLA2.86 s
595× faster, warm · cold 6.9 s
plate 6· KS 0.025 LatteR-INLA
Scottish lip cancer
Poisson + Besag · log-offset
Latte INLA · warm10 msR-INLA2.83 s
299× faster, warm · cold 8.88 s
district #3· KS 0.007 LatteR-INLA
New Haven temperature
Normal + RW2 · 1912–1971
Latte INLA · warm28 msR-INLA1.58 s
56.2× faster, warm · cold 8.76 s
year 1936· KS 0.048 LatteR-INLA
Tokyo rainfall
Binomial + RW2 · 366 days
Latte INLA · warm76 msR-INLA1.51 s
19.9× faster, warm · cold 10.05 s
day #283· KS 0.040 LatteR-INLA
Epil (BUGS)
Poisson + IID · 59 subjects
Latte INLA · warm129 msR-INLA1.88 s
14.6× faster, warm · cold 7.52 s
subject #18· KS 0.018 LatteR-INLA
SPDEtoy
Gaussian + Matérn SPDE
Latte INLA · warm1.69 sR-INLA2.36 s
1.4× faster, warm · cold 9.43 s
field node 683· KS 0.018 LatteR-INLA
Paraná precipitation
Gamma + RW1 + Matérn SPDE
Latte INLA · warm745 msR-INLA2.21 s
3.0× faster, warm · cold 11.87 s
field node #147· KS 0.105 LatteR-INLA

Scaling in n

The same spatial Poisson–Matérn (SPDE) model fit at five mesh resolutions, on a mesh handed identically to both engines — so the curves isolate how each scales with the latent dimension, not the problem setup.

SCALING · SPATIAL POISSON–MATÉRN · FULL FIT

Wall-clock against problem size.

one SPDE model on a shared mesh · five resolutions · same posterior

5001k3k10k30klatent dimension n (log) →0.3s1s3s10s30sfit wall-clock · lower = fasterR-INLA serialR-INLA parallelLatte serialLatte threaded
nLatte
serial
Latte
threaded
R-INLA
serial
R-INLA
parallel
Latte thr ÷
R-INLA par
5290.27s0.21s2.10s3.03s14.7×
1,7780.95s0.74s4.04s2.93s4.0×
3,8783.07s2.72s7.75s4.03s1.5×
9,9807.55s6.04s19.57s8.45s1.4×
23,70425.33s19.55s60.82s25.28s1.3×

Latte's serial fit tracks R-INLA's parallel fit at the top end and beats it below it; threaded, it leads at every size. R-INLA gains more from threads (steeper self-speedup) off a slower serial baseline, so absolute wall-clock still favors Latte here. One workstation, one benchmark family. Latte threaded = 10 Julia threads; R-INLA parallel = num.threads "10:1". PARDISO unavailable on this machine, so R-INLA's inner sparse solves run serial taucs — with PARDISO its parallel times could tighten at large n.

Coming next

Cross-engine comparisons — the same model under INLA, TMB, and HMC-Laplace — plus scaling in hyperparameter dimension. A dedicated TMB comparison (Latte's tmb() against the TMB R package on matched Laplace marginal-likelihood models) will follow in a later release. Scripts land in benchmark/ as they're run.

Reproducibility

Run the benchmarks yourself; tell us when something looks off.

SCRIPTS

All benchmark scripts live in benchmark/ in the repo. Each receipt above maps to a single file.

CADENCE

Benchmarks are rerun for each Latte minor release and at least every six months for external package versions.

CORRECTIONS

Think a comparison is unfair or outdated? Open an issue with a reproducible script. We'd rather know.