Skip to content

perf: configurable float storage dtype (default float32, ~½ coeffs memory)#839

Draft
FBumann wants to merge 3 commits into
PyPSA:masterfrom
fluxopt:perf/values-float32
Draft

perf: configurable float storage dtype (default float32, ~½ coeffs memory)#839
FBumann wants to merge 3 commits into
PyPSA:masterfrom
fluxopt:perf/values-float32

perf(values): keep float32 constant ops in float32

d23e0d7
Select commit
Loading
Failed to load commit list.
CodSpeed HQ / CodSpeed Performance Analysis succeeded Jul 16, 2026 in 0s

Performance Gate Passed

⚡ 99 improved benchmarks
✅ 74 untouched benchmarks
⏩ 173 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Memory test_op[expr_add_scalar] 187.5 KB 93.8 KB ×2
Memory test_op[var_div_scalar] 562.5 KB 281.3 KB +100%
Memory test_op[expr_mul_array_match] 468.8 KB 234.4 KB +100%
Memory test_op[expr_mul_scalar] 468.8 KB 234.4 KB +100%
Memory test_to_lp[expression_arithmetic-n=250] 2.9 MB 1.4 MB +99.3%
Memory test_to_lp[knapsack-n=10000] 82.2 KB 43.9 KB +87.34%
Memory test_to_lp[nodal_balance-severity=0] 129.1 KB 71.3 KB +81.19%
Memory test_op[expr_sum_all] 212.3 KB 118.6 KB +79.05%
Memory test_op[expr_sum_dim] 212.3 KB 118.6 KB +79.05%
Memory test_op[con_eq_expr] 1,079.7 KB 610.9 KB +76.73%
Memory test_op[expr_sub_expr_match] 1,079.7 KB 610.9 KB +76.73%
Memory test_op[var_add_var_match] 1,079.9 KB 611.1 KB +76.71%
Memory test_op[var_sub_var_match] 1,079.9 KB 611.1 KB +76.71%
Memory test_op[expr_add_var] 986 KB 564.1 KB +74.79%
Memory test_op[var_add_var_bcast] 4.4 MB 2.6 MB +73.17%
Memory test_op[expr_add_expr_bcast] 4.4 MB 2.5 MB +72.68%
Memory test_op[var_mul_var] 891.8 KB 516.8 KB +72.57%
Memory test_op[expr_add_expr_match] 892.1 KB 517.1 KB +72.52%
Memory test_op[expr_add_masked] 892.1 KB 517.1 KB +72.52%
Memory test_build[cumsum-severity=0] 16.4 KB 9.6 KB +70.24%
... ... ... ... ... ...

ℹ️ 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/values-float32 (d23e0d7) with master (c2607b6)

Open in CodSpeed

Footnotes

  1. 173 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.