Footprint
Accuracy is on the accuracy page and runtime
on the performance page. This page is the third axis:
what the library costs to carry. Every number is measured by
benchmarks/footprint.py.
| item | measured | how |
|---|---|---|
| Python reference, source | 292 KB, 7,284 lines in 28 files | the whole library, standard library only; skaters.torch excluded |
| Declared dependencies | none | pyproject.toml; numpy is not required |
| Published wheel | 106 KB (skaters 0.16.0 on PyPI) | what pip downloads |
| Import time | 22 ms | fresh interpreter, median of 5 |
| laplace(1) checkpoint | 23 KB | pickled state after 500 observations |
| laplace(3) checkpoint | 132 KB | pickled state after 500 observations |
| laplace(1) resident memory | 192 KB | tracemalloc, one instance, 500 steps; peak 204 KB |
| laplace(3) resident memory | 1027 KB | tracemalloc, one instance, 500 steps; peak 1067 KB |
| JavaScript port, source | 114 KB, 3,148 lines | ES modules, no dependencies; runs in the browser |
| Rust core, source | 149 KB, 4,855 lines | the fast backend and the wasm build |
| skaters_fast binary | 1491 KB | the compiled PyO3 extension, this machine |
Reading it
The reference is a few hundred kilobytes of standard-library Python with no
dependencies, so it installs anywhere Python runs, including Pyodide in the
browser. A running laplace is a dictionary of floats: its checkpoint is
the state above, which round-trips through pickle or JSON bit for bit (the parity
suite checks the restore), so a forecaster can be paused, stored and resumed per
series. The compiled core is larger than the source it mirrors, as compiled code
is, and is optional.
Reproducing this
PYTHONPATH=src python benchmarks/footprint.py
Measured 2026-10-28 on arm64, Python 3.13.7, commit 4fa186b.