BAM Engine 0.10.2 improves how memory scales with population, keeping the footprint low even at large agent counts.
Near-Linear Memory Scaling#
The credit market’s bank-selection step allocated a scratch structure whose size grew with the square of the number of firms, and this dominated peak memory at large scale. It now uses the same sparse selection already applied in the labor and goods markets. Peak memory at 20,000 firms drops from roughly 550 MB to roughly 210 MB, and the footprint now scales near-linearly with the number of agents. Steady-state runtime is unchanged.
This matters most for large calibration, sensitivity, and robustness sweeps, where memory, rather than speed, had become the practical ceiling.
Upgrading#
pip install --upgrade bamengineSee the release history for full details.