Skip to content

perf: default integer arrays to int32 for ~25% memory reduction#566

Merged
FabianHofmann merged 11 commits into
PyPSA:masterfrom
fluxopt:perf/int32
Jul 14, 2026
Merged

perf: default integer arrays to int32 for ~25% memory reduction#566
FabianHofmann merged 11 commits into
PyPSA:masterfrom
fluxopt:perf/int32

perf(int32): respect label_dtype when reconstructing CSR constraints

f7bad31
Select commit
Loading
Failed to load commit list.
CodSpeed HQ / CodSpeed Performance Analysis succeeded Jun 30, 2026

Performance Gate Passed

⚡ 53 improved benchmarks
✅ 85 untouched benchmarks
⏩ 138 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Memory test_to_lp[storage-n=250] 1,319.2 KB 663 KB +98.96%
Memory test_to_lp[storage-n=10] 56.5 KB 30.3 KB +86.29%
Memory test_to_lp[basic-n=250] 2 MB 1.3 MB +56.84%
Memory test_to_lp[kvl_cycles-severity=100] 38.5 MB 25.6 MB +49.99%
Memory test_to_lp[sparse_network-n=250] 34.5 MB 23 MB +49.99%
Memory test_to_lp[rolling-severity=100] 45.8 MB 30.5 MB +49.99%
Memory test_to_lp[kvl_cycles-severity=50] 38.5 MB 25.6 MB +49.99%
Memory test_to_lp[nodal_balance-severity=100] 17.9 MB 11.9 MB +49.98%
Memory test_to_lp[cumsum-severity=100] 29.3 MB 19.5 MB +49.98%
Memory test_to_lp[merge_balance-severity=100] 17.6 MB 11.7 MB +49.98%
Memory test_to_lp[nodal_balance-severity=50] 9.2 MB 6.1 MB +49.97%
Memory test_to_lp[merge_balance-severity=50] 9 MB 6 MB +49.97%
Memory test_to_lp[rolling-severity=50] 45.9 MB 30.6 MB +49.93%
Memory test_to_lp[kvl_cycles-severity=0] 38.5 MB 25.7 MB +49.92%
Memory test_to_lp[nodal_balance-severity=0] 385.3 KB 258.8 KB +48.91%
Memory test_to_lp[masked-n=100] 238.4 KB 160.3 KB +48.74%
Memory test_to_lp[milp-n=50] 63.5 KB 43.9 KB +44.45%
Memory test_to_lp[sparse_network-n=10] 29.8 KB 21.2 KB +40.5%
Memory test_to_lp[merge_balance-severity=0] 367.8 KB 262.8 KB +39.95%
Memory test_to_lp[sos-n=1000] 90.7 KB 67.5 KB +34.3%
... ... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing fluxopt:perf/int32 (f7bad31) with master (fe798b1)

Open in CodSpeed

Footnotes

  1. 138 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.