Skip to content

Benchmarks ​

These benchmarks answer two separate questions:

  1. How did the performance branch change jaxgsa itself?
  2. How does jaxgsa analysis time compare with SALib on the same data?

Both suites time the analysis step, not model evaluation or sampling. The results describe the workloads and machine below; they are not package limits.

Results at a glance ​

Across the 27-case jaxgsa workload matrix, the performance branch reduced the sum of warm median analysis times from 0.921 s to 0.430 s, a 53% reduction. The geometric mean fell from 6.98 ms to 5.14 ms. The largest isolated gains were in HSIC and VKOGA; most methods changed little because the branch did not rewrite their main estimator.

Against SALib, scalar work remains the least favourable case for JAX. The advantage grows when one call analyzes many output slices or bootstrap replicates, because jaxgsa keeps that work inside compiled array programs.

Environment ​

All results on this page were measured on 15 September 2026 with:

ComponentValue
MachineMacBook Pro with Apple M1 Pro, 8 CPU cores, 16 GB memory
Operating systemmacOS 15.6.1, arm64
Python3.12.13
jaxgsa0.9.0 development tree
JAX / jaxlib0.10.2 / 0.10.2
NumPy2.4.2
SALib1.5.2
BackendJAX CPU, float32

No GPU or TPU result is inferred from these CPU measurements.

Performance branch against master ​

The all-method harness runs every case in a fresh subprocess. It records the first call separately, then reports the median of nine warm calls. Each call blocks until its JAX arrays are ready. Expected jaxgsa warnings and verbose reports are disabled inside the timed region.

The baseline is commit 94a4043 on master. The candidate is performance PR #80 at commit 4215d19 plus the benchmark-only suppression of reports and expected warnings. Both use the same harness, environment, seed, inputs, and process-isolation policy.

Representative warm results ​

WorkloadShapemasterPRRatioPeak RSS: master → PR
Sobol, smallD=3, N=1024, scalar0.86 ms0.52 ms1.7x72 → 55 MiB
Sobol, high sample countD=3, N=65536, scalar1.96 ms1.01 ms1.9x60 → 33 MiB
Sobol, high dimension with S2D=30, base N=8192, scalar7.37 ms3.45 ms2.1x108 → 66 MiB
Sobol, time seriesD=3, N=8192, 300 slices17.21 ms9.00 ms1.9x202 → 96 MiB
Sobol, bootstrapD=3, N=4096, 32 slices, 100 resamples74.88 ms48.85 ms1.5x333 → 173 MiB
KucherenkoD=10, N=8192, 32 slices22.21 ms17.83 ms1.2x110 → 107 MiB
HSICD=3, N=512, scalar, 10 permutations152.95 ms23.10 ms6.6x344 → 318 MiB
VKOGAD=3, N=512, scalar348.29 ms27.15 ms12.8x328 → 202 MiB

The 27 cases deliberately include small problems, high N, high D, multi-output/time-series arrays, and bootstrap workloads across all thirteen methods. The complete machine-readable results are available for the baseline and performance branch.

Aggregate results ​

Metric across 27 isolated casesmasterPRChange
Sum of warm medians0.921 s0.430 s−53%
Geometric mean of warm medians6.98 ms5.14 ms−26%
Sum of per-case peak RSS deltas3968 MiB3304 MiB−17%
Largest per-case peak RSS delta344 MiB318 MiB−7%

The memory sum is an aggregate comparison, not simultaneous memory use: each case runs in a separate process. RSS is a process high-water mark, so small differences near the existing high-water mark are noisy.

The branch is not faster in every case. Several sub-millisecond cases sit near the dispatch and timer floor, and the 512-slice Sobol and PAWN cases varied by a few percent between runs. The large HSIC, VKOGA, and Sobol changes are well above that noise.

Comparison with SALib ​

The competitor benchmark runs jaxgsa and SALib on identical arrays. It reports the best of repeated warm calls, so these numbers answer a narrower question than the median-based branch comparison above.

The Sobol and HDMR benchmark first checks both libraries on the Ishigami model. All gated Sobol comparisons passed against SALib and the analytical indices. HDMR-to-analytical rows remain informational because a low-order surrogate is not exact for Ishigami.

Sobol without bootstrap ​

D=5, base N=1024. The second-order design contains 12,288 model outputs; the first/total-only design contains 7,168.

Output shapejaxgsa, no S2SALib, no S2Ratiojaxgsa with S2SALib with S2Ratio
1 × 10.6 ms0.2 ms0.4x0.8 ms0.8 ms1.0x
1 × 60.6 ms1.3 ms2.1x0.9 ms5.1 ms5.4x
50 × 11.1 ms11.8 ms10.6x1.7 ms43.6 ms25.9x
50 × 64.4 ms71.6 ms16.1x7.4 ms262.8 ms35.4x

Sobol with 300 bootstrap resamples ​

Output shapejaxgsa, no S2SALib, no S2Ratiojaxgsa with S2SALib with S2Ratio
1 × 14.1 ms23.2 ms5.6x6.7 ms69.7 ms10.4x
1 × 615.7 ms121.7 ms7.8x42.1 ms397.9 ms9.4x
50 × 1263.6 ms1119.6 ms4.2x434.2 ms3393.5 ms7.8x
50 × 61363.3 ms7422.8 ms5.4x2754.9 ms22841.6 ms8.3x

HDMR ​

maxorder=2, m=2, 1,024 random samples, no bootstrap.

Output shapejaxgsaSALibRatio
1 × 17.0 ms81.8 ms11.6x
1 × 66.4 ms479.0 ms74.3x
50 × 110.3 ms3629.6 ms352.1x
50 × 623.8 ms25973.1 ms1089.7x

The largest ratios measure architecture as much as arithmetic. SALib runs one HDMR analysis per output slice in Python, while jaxgsa fits all slices in one compiled call. Quote the workload with the ratio; 1089.7x is specifically a 300-slice comparison against single-process SALib.

Four-method comparison ​

The supplemental benchmark covers Sobol, eFAST, DGSM, and HDMR on Ishigami (D=3) and Oakley--O'Hagan (D=15). These are analysis timings, not accuracy results. DGSM also differs in what is timed: jaxgsa receives a precomputed Jacobian, while SALib computes finite differences inside its analysis call.

Problem and outputSoboleFASTDGSMHDMR
Ishigami, 1 × 10.2x0.8x0.3x6.0x
Ishigami, 50 × 65.7x7.2x17.0x609.7x
O'Hagan, 1 × 10.6x2.4x1.5x45.4x
O'Hagan, 50 × 110.4x13.3x22.8x1968.1x

Ratios above 1 mean jaxgsa was faster. The generated figures retain every scenario:

Speedup by method and scenario

Speedup versus output dimensionality

Sobol bootstrap timing and interval width

What the benchmarks do not show ​

  • Model evaluation and sampling are excluded. For an expensive simulator, estimator speed may have little effect on total study time.
  • The SALib baseline is single-process CPU execution. No claim is made against a user-written parallel wrapper.
  • First calls include tracing and compilation. The warm figures apply after compiled programs are reusable for the same shapes.
  • The branch matrix uses method-specific benchmark settings; it does not rank the scientific value or accuracy of different sensitivity measures.
  • Surrogate timings do not establish surrogate quality. Check the fit before interpreting PCE, HDMR, Shapley, or VKOGA indices.
  • Results on other hardware and software versions will differ.

Reproduce the results ​

Run the all-method branch matrix:

bash
uv run .auto/bench_gsa.py --repeats 9 --out benchmark.json

Run the correctness-checked Sobol and HDMR comparison:

bash
uv run --extra dev benchmark_salib.py

Regenerate the four-method cache and figures:

bash
uv run --extra dev examples/benchmark_all.py --refresh

Use an otherwise idle machine. Record the exact commit, hardware, dependency versions, backend, dtype, sample dimensions, and whether the figures are cold or warm whenever you publish new numbers.

Analytical benchmark functions ​

jaxgsa.benchmarks ships five models with analytical or published reference indices. Use them to test estimator accuracy separately from runtime.

ModuleParametersMarginalsUseful check
ishigami3Uniform [−π,π]Separates a zero first-order effect from a non-zero total effect
sobol_g8Uniform [0,1]Provides clear influential and nearly inert parameter tiers
linear3Uniform [0,1]Has equal first/total indices and zero interactions
gaussian_linear3GaussianIncludes analytical Borgonovo and optimal-transport indices
oakley_ohagan15GaussianTests a flatter, interaction-rich sensitivity profile

Each module provides a PROBLEM, batched evaluate(X), and analytical or published arrays. Read the module API for non-default parameters and the method comparison example for a worked accuracy comparison.

Released under the BSD-3-Clause License.