What the benchmarks found

Measured on one thread (i9-14900KF efficiency core) with synthetic ecoinvent v5 unless noted. Stories come first, then remaining headlines by package, then the full write-ups.

Stories

Headlines

bw_graph_tools

  1. bw_graph_tools 0.9 made traversal up to 6 times faster

    Batched scoring took a 2-calculation EXIOBASE traversal from 1.19 minutes to 12.0 s.

Unless a finding says otherwise, the numbers come from the benchmark history, measured in November 2026 on the ecoinvent-sized synthetic database (generator v5), one thread, on an efficiency core of an Intel i9-14900KF. Every release runs on the same fixed dependencies, so a step in a history is that package’s own change (method).

On generator v5, a direct-solver score takes 1.4 to 1.6 times as long as factorizing the real ecoinvent 3.12 matrix, in the same solver order (#54, method). The pinned #85 lists every upstream issue with its current state.

bw2calc

The solver sets the time for one score

On one thread, PyPardiso and UMFPACK on reference BLAS give a score about 2 times faster than SciPy’s SuperLU, and UMFPACK on OpenBLAS about 5 times. (PyPardiso also scales across threads.)

What to do.

Solver One score with LCA, bw2calc 3.1.0
SuperLU (SciPy) 4.98 s
UMFPACK, scikit-umfpack built on reference BLAS 2.54 s
PyPardiso 2.22 s
UMFPACK, conda-forge’s build on OpenBLAS 1.03 s
UMFPACK, conda-forge’s build on MKL’s BLAS 0.980 s

The reference BLAS row comes from the bw2calc history, the others from bw2calc-conda. No release from 2.0 to 3.1.0 changed these times, with one exception: PyPardiso from PyPI takes about 0.1 s longer from 3.0.0 on, the release that started the MKL search below. A generator v4 profile put the LU factorization at 98% of one score under PyPardiso; v5 has not been profiled. JacobiGMRESLCA (from 2.4.0) gives a score in 133 ms, with a relative error of 5.6e-9, on the synthetic matrix only.

Graph: bw2calc, one score. Rerun: bench_lca.SingleScore.

Energy per first score

On generator v5, PyPardiso used 47 J above idle per first score, against 54 J for UMFPACK and 100 J for SuperLU.

The 20 November 2026 run measured CPU-package energy with Intel RAPL. It used bw2calc 3.1.0, Python 3.13, one thread on an E-core, and the synthetic ecoinvent-sized profile. The five-minute idle baseline was 4.79 W. Each sample subtracts that power times its own elapsed time.

Solver Median package J per score Median J above idle Above-idle range, 3 samples
SuperLU (SciPy) 123.4 99.7 99.3–100.4
PyPardiso 58.0 47.0 46.8–48.3
UMFPACK, PyPI build 65.8 53.6 53.2–53.9

Each reading covers one first score, with setup and verification outside the measured span. RAPL measures CPU-package energy, including other processes. Measurement and idle subtraction.

In a separate seven-pair MultiScores run at the same size, setting the MKL library path explicitly cut median time from 2.489 to 2.401 s for 10 demands. Median paired energy savings above idle were 0.06 J, with a range of −4.22 to +3.84 J.

Rerun: bench_lca.SingleScore, with the idle sampler and energy summary as described in the measurement instructions.

Keep the factorization for repeated solves

A second functional unit on a solved system takes milliseconds, against seconds for the first. A warm-up solve doesn’t help.

What to do.

With UMFPACK on bw2calc 3.1.0, a second functional unit on the stored factorization takes 17.6 ms, against 2.54 s for the first score. On generator v4 and a faster core, PyPardiso’s kept factorization took a score from 5.2 to 0.09 s, and SuperLU’s first score took 19.1 s after a warm-up solve, against 19.2 s without.

Graph: bw2calc, second functional unit. Rerun: bench_lca.NewDemand.

UMFPACK’s speed depends on its BLAS and its refinement step

UMFPACK factorizes about 3 times faster on OpenBLAS (a tuned linear-algebra library) or MKL than on reference BLAS (the unoptimized default). On reference BLAS and OpenBLAS, about two thirds of each repeated solve is iterative refinement (an extra pass to reduce rounding error), which does not change the score.

bw2calc can’t turn refinement off yet (brightway2-calc#186 does). What to do.

The history builds scikit-umfpack, which has no PyPI wheels, on Debian’s reference BLAS. bw2calc-conda runs the suite on conda-forge’s builds instead. There, on bw2calc 2.4.0 and 3.1.0 alike, UMFPACK’s first score drops from about 2.55 to 1.03 s. A second functional unit is 23% slower on 2.4.0 (41.8 against 33.9 ms) and 40% slower on 3.1.0 (24.6 against 17.6 ms), on MKL’s BLAS too. So the slower solve comes with conda-forge’s builds, not the BLAS. SuperLU stays within 2% (1.7% on 2.4.0’s second functional unit), and PyPardiso within 1% on 2.4.0; on 3.1.0, conda-forge’s PyPardiso is 4% faster than PyPI’s. Scores match.

On the real ecoinvent 3.12 matrix:

UMFPACK on Factorize lu_solver solve Aᵀx = b, refinement on Aᵀx = b, refinement off
Reference BLAS (PyPI build) 1.78 s 16.5 ms 10.5 ms 3.7 ms
OpenBLAS (conda-forge) 0.66 s 24 ms 12.7 ms 4.8 ms
MKL (conda-forge) 0.63 s 24 ms 6.3 ms 4.8 ms

The two pairs of columns time different calls, so don’t compare across them. The first pair comes from scripts/solver_factorize.py through bw2calc’s lu_solver (which wraps SciPy’s solve path). The second times UMFPACK’s direct solve of Aᵀx = b. MKL takes no refinement step. With refinement off, conda-forge’s UMFPACK is about 30% slower per solve than the PyPI build.

Every direct solver on the same matrix, through the same script, with bw2calc 3.1.0, SciPy 1.18.1, scikit-umfpack 0.4.2 from PyPI, PyPardiso 0.4.7 and pyklu 0.2.0, on one thread and the same efficiency cores. The two conda-forge rows repeat the table above.

Solver Factorize
SuperLU (SciPy) 3.66 s
UMFPACK, PyPI build on reference BLAS 1.78 s
PyPardiso 1.48 s
KLU through pyklu, which bw2calc can’t pick 1.31 s
UMFPACK, conda-forge’s build on OpenBLAS 0.66 s
UMFPACK, conda-forge’s build on MKL’s BLAS 0.63 s

The matrix has 26,533 rows and 338,195 nonzeros. A solve on the factors takes 5 to 24 ms, so factorizing is 96 to over 99% of the solver’s time. SuperLU’s whole spsolve, the call LCA.lci() makes, takes 3.66 s. So SuperLU takes about 5.5 times as long as conda-forge’s UMFPACK, against about 4.8 times for a whole score on the synthetic database. On a performance core, each time is 1.7 to 2 times shorter, in the same order (conda-forge’s builds weren’t run there).

Graph: bw2calc-conda, one score. Rerun: bench_lca.NewDemandRefinement.

bw2calc 3.0.0 slowed IterativeLCA without PyPardiso, and 3.1.0 fixed it

bw2calc 3.0.0 made IterativeLCA about 12 times slower with UMFPACK and about 25 times slower with SuperLU. 3.1.0 is back to 2.5.0’s times, and also makes lci(factorize=True) fast for the first time.

IterativeLCA, one score 2.5.0 3.0.0 3.1.0
UMFPACK, reference BLAS 2.54 s 31.3 s 2.54 s
SuperLU 4.98 s 2.1 minutes 4.95 s

LCA.lci(factorize=True) was timed on generator v4 only: 45.0 s with UMFPACK and 237 s with SuperLU on 3.0.0, against 9.05 and 27.7 s on 3.1.0.

SuperLU and UMFPACK factorize Aᵀ several times faster than A. lci(factorize=True) factorized A in 2.5.0 and 3.0.0, as did 3.0.0’s IterativeLCA. 3.1.0 factorizes Aᵀ (brightway2-calc#180). Reported as brightway2-calc#176.

Rerun: bench_lca.SingleScore, and just solver-lci umfpack ecoinvent 3.0.0 for lci(factorize=True).

bw2calc 2.4.0 and 2.5.0 skipped JacobiGMRESLCA’s Monte Carlo solve

In bw2calc 2.4.0 and 2.5.0, JacobiGMRESLCA solved a stale copy of the technosphere matrix in Monte Carlo, so its draws ignored technosphere uncertainty. 3.0.0 fixed it. This section used to report the fix as a 3.0.0 slowdown: 2.5.0 was only faster because it skipped the solve.

What it means for you: don’t use JacobiGMRESLCA for Monte Carlo on 2.4.0 or 2.5.0. From 3.0.0 on, ten draws take about 0.65 s on the ecoinvent-sized synthetic database, with every solver.

In 2.4.0 and 2.5.0, the first solve replaced technosphere_matrix with a CSC copy. Each draw wrote its values into technosphere_mm.matrix, but GMRES kept solving the copy, starting from its exact solution. On one draw at smoke size, the score was 12% off a direct solve of the sampled matrix; with 3.1.0 the difference is 3e-10. The fix is brightway2-calc#155, first released in 3.0.0. Reported as brightway2-calc#187.

Of the classes checked, only JacobiGMRESLCA is affected. Four draws with LCA on SuperLU, UMFPACK and PyPardiso match a direct solve of the sampled matrix to 3e-16 on 2.0.2, 2.1.1, 2.2.2, 2.3.2, 2.4.0, 2.5.0, 3.0.0 and 3.1.0. JacobiGMRESLCA on 2.4.0 and 2.5.0 returns one score for all four draws, up to 17% off over those draws. The cause is self.technosphere_matrix = self.technosphere_matrix.tocsc(copy=False) at line 83 of src/bw2calc/jacobi_gmres_lca.py in both releases, a copy technosphere_mm never writes to. IterativeLCA never reassigns the matrix, but PyPI’s 2.x releases pass atol="legacy" to a SciPy that rejects it, so this check does not cover it.

The benchmark’s own check missed it, because it solved technosphere_matrix too, the same stale copy. It now solves the sampled matrices. A run on 2.4.0 or 2.5.0 skips the case with a link to the report, and the viewer leaves out the points measured before (benchmarks/invalid.toml).

Graph: bw2calc, Monte Carlo. Rerun: bench_lca.MonteCarlo.

JacobiGMRESLCA draws Monte Carlo about 1.75 times faster than IterativeLCA at 100,000 products

With bw2calc 3.1.0, a Monte Carlo draw with JacobiGMRESLCA takes the same time under SuperLU, UMFPACK and PyPardiso, and IterativeLCA is slower under PyPardiso. At 100,000 products, 10 draws take 3.09 s with JacobiGMRESLCA and 5.41 s with IterativeLCA; 30 draws take 9.17 s and 16.2 s. On the ecoinvent-sized database, 10 draws take 0.66 s with JacobiGMRESLCA, and 0.65 (SuperLU), 0.69 (UMFPACK) or 0.79 s (PyPardiso) with IterativeLCA.

IterativeLCA at 100,000 products runs only under PyPardiso: SuperLU and UMFPACK skip it, because one factorization would take about 344 minutes. The times are medians of five paired rounds on an efficiency core of the i9-14900KF, with a spread under 3%. JacobiGMRESLCA warns that its Jacobi preconditioner falls back to the diagonal, because the synthetic datapackages carry no reference arrays.

Rerun: bench_lca.MonteCarlo.

cuDSS refactorizes real ecoinvent in 37 ms, but that isn’t a Monte Carlo draw yet

On real ecoinvent 3.12 cut-off, NVIDIA’s cuDSS factorizes on the GPU in about 0.25 s and repeats the numeric factorization in 37 to 38 ms, about 6 times faster than PARDISO on eight threads. It’s a solver probe: the repeat reuses the same values and sparsity pattern.

What it means for you: nothing yet. bw2calc can’t use cuDSS, and these times don’t include sampling, rebuilding the matrices, or the inventory and impact scores of a real draw.

Two rounds at each CPU thread count ran on the performance cores of an Intel i9-14900KF with an NVIDIA RTX 4090. Each round takes the median of three factorizations and five solves, and the table gives the range over the two rounds. GPU times include the transfers to and from the host. The CUDA context and library warm-up happen before timing.

Solver CPU threads First factorization Repeated numeric factorization Solve
SuperLU 1 2.45 to 2.66 s Not measured 5.50 to 5.60 ms
UMFPACK, reference BLAS 1 1.07 to 1.08 s Not measured 9.70 ms
KLU 1 0.766 to 0.833 s Not measured 2.90 to 5.40 ms
PARDISO 1 0.779 to 0.791 s 0.610 to 0.615 s 9.70 to 10.4 ms
PARDISO 8 0.291 to 0.392 s 0.211 to 0.248 s 7.70 to 9.50 ms
cuDSS 1 or 8 0.250 to 0.257 s 37.0 to 38.0 ms 1.00 to 1.10 ms

The scores agree with UMFPACK to a relative difference of at most 4e-12, checked with a random positive characterization row. With changing values (--cudss-updates: three row-scaled updates, same sparsity), cuDSS still refactorizes in 34 to 37 ms without a new analysis. The solutions stay within a relative difference of 4e-10 of SuperLU’s.

A GPU backend needs real LCA draws, changed sparsity and resource cleanup tested before anyone claims this for Monte Carlo. It’s the case for letting callers choose the solver in bw2calc (brightway2-calc#184).

Rerun: scripts/solver_factorize.py --pardiso --cudss, with your own licensed ecoinvent release. Its module docstring gives the container command and the pinned GPU packages.

Every new LCA object under PyPardiso searches for MKL again

From 3.0.0, each LCA object under PyPardiso makes a fresh solver, which searches the Python install for the MKL library. 3.1.0 still does.

What to do. haasad/PyPardiso#91 would find the library once (#56).

On real USEEIO, with bw2calc 3.1.0, PYPARDISO_MKL_RT set to the environment’s libmkl_rt.so.3 cut the first score from 127 to 39 ms (-69%). Thirty demands took 189 to 100 ms with MultiLCA (-47%), 137 to 49 ms with the forward direction (-64%) and 131 to 44 ms with the adjoint (-66%). Five paired runs each, medians, with a spread under 3% inside each arm except the direct first score (6%).

On a Windows hosted runner at smoke size, supplying the path made the first score 19 times as fast (20 paired rounds, 95% bootstrap interval 18.4–19.2). For a new demand with the factorization already available, the ratio was 1.03 (0.99–1.05). Both arms used the same MKL DLL and checked the score against the synthetic reference. This measures the fresh-object overhead on one runner with bw2calc 3.1.0 and PyPardiso 0.4.7.

Windows run and samples (rerun with the mkl-windows workflow or PYTHONPATH=src python -m scripts.mkl_path_probe). Linux instruction check: just codspeed bw2calc bw2calc==3.0.0 pypardiso.

Two upstream crashes skip cases

JacobiGMRESLCA and FastScoresOnlyMultiLCA under PyPardiso free a factorization they never made (brightway2-calc#157). IterativeLCA passes atol='legacy' to SciPy’s cgs, which the pinned SciPy rejects (brightway2-calc#161). skip_known_crash lists both.

A score error reads against the matrix’s condition number

Every size logs a condition estimate (how sensitive the solve is to rounding) next to its times, so a solver that misses the reference can be read against how hard the matrix is. A direct solver’s relative error is about the condition number times 1e-16, and the checks allow 1e-9, or 1e-6 on BAFU 2025.

Matrix Condition estimate (1-norm) Largest score error over 30 products
USEEIO 6.2 1.5e-15 SuperLU, 1.1e-15 UMFPACK
ecoinvent-shaped synthetic 3.2e3 4.3e-15 SuperLU, 1.7e-15 UMFPACK (generator v4)
BAFU 2025 9.4e21 6.5e-7 SuperLU (passes only BAFU’s 1e-6), 1.9e-15 UMFPACK

The condition estimates are generator v5’s. The score errors come from the 30-product checks’ logs, not from the stored results. On generator v5 the stored one-score errors on the ecoinvent-shaped matrix are 2.75e-15 with SuperLU, 2.60e-15 with UMFPACK and 2.90e-15 with PyPardiso.

BAFU’s estimate is far past 1e16, so a direct solve has no digits to promise. SuperLU lands 8 orders of magnitude from UMFPACK’s refined solve at 1e-15.

The estimate is SciPy’s onenormest on the SuperLU inverse times the 1-norm of A, with a fixed seed, so a given SciPy build gives the same value for a size. Near 1e22 the number comes from rounding in the LU factors. Read BAFU’s as an order of magnitude: another BLAS or compiler can move it.

Rerun: bench_lca.Conditioning.

bw2data

bw2data 4.7 lost the faster database write

bw2data 4.7 undid #268, which had cut the write time by 35% two commits earlier.

What it means for you: nothing yet. brightway2-data#308 brings it back (brightway2-data#306).

Writing an ecoinvent-sized database takes 11.8 s on 4.6.2 and 4.7, and 11.9 s on 4.8. #268’s raw SQLite executemany took 7.59 s, and #270, the next commit, 11.7 s. The times come from asv’s --interleave-rounds.

Graph: bw2data, database write. Rerun: bench_write.DatabaseWrite.

bw_timex

bw_timex 1.3.0 made the time-explicit LCI about 19 times slower

bw_timex 1.3.0 made the time-explicit LCI about 19 times slower. 1.3.2 fixed it, and 1.4.0 is faster again.

What it means for you: use bw_timex 1.4.0 or later, and avoid 1.3.0 and 1.3.1.

Time steps 1.2.0 1.3.0 1.3.2 1.4.0
5 25.9 s 8.4 minutes 13.4 s 3.3 s
20 34.1 s 7.9 minutes 19.3 s 9.3 s

These times come from the October 2026 history on the ecoinvent-sized database. The current history runs bw_timex on BAFU 2025 and the newest release of each minor line, so it has no 1.3.0.

In 1.3.0, a database block without a cached LU was factorized again on every solve. bw_timex#234, in 1.3.2, factorizes each block once.

Graph: bw_timex, time-explicit LCI. Rerun: bench_timex.TimelineLCI.

bw_graph_tools

bw_graph_tools 0.9 made traversal up to 6 times faster

bw_graph_tools 0.9’s batched scoring makes traversal with PyPardiso 1.1 to 6 times faster, except on BAFU 2025, where it is slower. Use 0.9 or later.

Database, with PyPardiso max_calc 0.8 0.9
ecoinvent 2 234 ms 210 ms
ecoinvent 100 12.3 s 8.16 s
EXIOBASE 2 1.19 minutes 12.0 s
EXIOBASE 100 over asv’s 15-minute limit 2.38 minutes
BAFU 2025 2 74.8 ms 88.5 ms
BAFU 2025 100 742 ms 1.00 s

Graph: bw_graph_tools, traversal. Rerun: bench_traversal.Traversal.

Without PyPardiso, traversal is hundreds of times slower

Without PyPardiso, a traversal of the ecoinvent-sized database takes 40 s to 2 minutes instead of a quarter of a second.

What to do.

At max_calc=2 on bw2calc 2.5.0, a traversal takes 39.4 s with SuperLU on bw_graph_tools 0.8, and 2.1 minutes from 0.9 on, against 0.21 to 0.23 s with PyPardiso. Version 0.8 solved with spsolve, which factorizes Aᵀ (matching bw2calc’s CSR matrix layout). From 0.9 it calls decompose_technosphere, which on bw2calc 2.5.0 factorizes A: 92 s against 3.7 s for Aᵀ on real ecoinvent 3.12, one thread. On an earlier generator, a profile put 234 of 235 s at factorizing A, and bw2calc 3.1.0, which factorizes Aᵀ, took 27.8 s. bw_graph_tools#58 proposes reusing the LCA’s factorization.

Rerun: bench_traversal.Traversal.

bw_processing and matrix_utils

Adding resource groups grows with the square of their number

Through bw_processing 1.6, lookup time grows with the square of the number of resource groups. Version 2.0 collects them in one pass.

On one E-core with Python 3.13 and a fixed dependency stack, upgrading bw_processing from 1.6 to 2.0 cut lookup for 10,000 groups from 32.6 s to 20.4 ms. For 100,000 entries, add_entries fell from 536 to 196 ms, while the generic dictionary iterator rose from 231 to 284 ms. The iterator now sorts records that hold wider floats, which probably contributes. The release comparison measures the combined effect of the changes in 2.0.

Holding bw_processing at 2.0, upgrading matrix_utils from 0.9 to 1.0 cut a 10,000-group matrix build from 7.87 to 1.75 s. The resource-group changes shipped in bw_processing#113 and matrix_utils#48.

Graph: bw_processing, resource groups. Rerun: bench_datapackage.Groups and bench_mapped_matrix.MappedMatrixBuild.

Smaller bw_processing findings

Across packages

A correct solve does not check the inventory or impact factors

The reference checks behind every timing compare the solve with an independent one, such as a Neumann series on the same matrices. A wrong inventory or a missing impact factor passes that check, as both sides solve the same system.

The heating model (src/bwbench/heating.py) shows why. BAFU’s climate factors sit on the parent air compartment. Matching flow identifiers alone leaves the gas boiler’s direct greenhouse gases without a factor, and the solve still checks out. The home-heating story explains the case and its matching rule; the method describes the model. Rerun it with just bench bw2calc at BWBENCH_SIZES=bafu.

Test suites and dependency floors

The compat suites and floors columns (running) found these:

  • Three of bw_timex’s explicit product-modelling tests fail under pytest 9.2.0 (bw_timex#247).
  • Five of bw2io 0.9.17’s CSV and Excel exporter tests fail with bw2data 4.8 (brightway2-io#354).
  • bw_graph_tools 0.10’s test_only_one_node_error_message fails when PyPardiso is installed. Not reported: an unreleased fix branch is already on bw_graph_tools.
  • On Python 3.12, twelve lower bounds declared by bw2parameters, bw_processing, bw2data, bw2calc and bw_timex are too low: the oldest release they allow fails. If you hold an old release of one of these dependencies, raise it to the version that scripts/compat.sh lists.

conda-forge gets releases late

conda-forge gets a Brightway release only once its feedstock merges the update. bw2calc stayed at 2.4.0 there until 3.1.0 landed on 2026-10-18. bw_graph_tools and bw_timex are not on conda-forge yet. Check the conda-forge rows of the compatibility view before you install from there. Rerun: just compat 3.13 conda-forge.