Supplementary File S1
Effect of CPU Thread Count on Dense Matrix Multiplication Performance in NumPy

Contents
  benchmark.py          Generates inputs and records the counterbalanced benchmark.
  analyze.py            Validates the expected measurement grid, aggregates times,
                        and produces the two manuscript figures.
  requirements.txt      Versions of the Python packages used in the experiment.
  data/timings.csv      The 720 timed batches used in the manuscript.
  data/environment.json
                        Software, CPU as reported by Linux, worker order, size
                        order, native thread limits, and sampled numerical errors.
  derived/summary.csv   Session-level summaries of times and paired speedups,
                        including quartiles and the process-CPU to wall-time ratio.
  derived/*.pdf, *.png  Vector PDF and raster exports of Figures 1 and 2.

Analyze the recorded experiment
  python -m pip install -r requirements.txt
  python analyze.py --data data --out reconstructed

Run the benchmark again
  python benchmark.py --out new_data
  python analyze.py --data new_data --out new_derived

The benchmark uses independent worker processes and a NumPy build linked to
OpenBLAS. The study used Python 3.12.14, OpenBLAS 0.3.30 with pthreads, and a
Linux x86-64 environment. For comparison, use a system that can provide at
least four logical CPUs and sufficient memory for the largest matrix size.
NumPy wheels or local builds may use different BLAS backends. The script
checks the backend and thread count before collecting data.

The timings file records session, threads, n, sample, calls, wall_ns, cpu_ns,
and position within session. A per-call wall time is wall_ns divided by calls.
Each row is one batch. Each plotted point first takes the median of four
batches for a session and configuration, then the median across six sessions.
Paired speedups compare the one-thread and target-limit session medians within
the same session before summarizing the ratios. CPU-time ratios are descriptive.
