Skip to content

perf: refbench against NumPy on one core; replace the multicore page - #105

Merged
tannevaled merged 2 commits into
mainfrom
perf/refbench-w3
Nov 8, 2026
Merged

tannevaled merged 2 commits into
mainfrom
perf/refbench-w3

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

Moves ndarray's speed comparison onto go-scikit/refbench v0.1.2 and replaces the multicore page.

What changes

  • bench/ (own module, as perf: migrate the SciPy comparison to refbench v0.1.1 (#33 step 1) go-numerics/special#35 and go-simd/floats bench/perf): rbtest.Perf, 256 rows covering Array methods, constructors, fft, linalg, random (Generator, RandomState, package functions), one case per public function (several shapes of use get several rows) and 121 named exemptions with a reason in docs/perf-exempt.md.
  • One core on both sides (GOMAXPROCS=1, one BLAS/OpenMP thread in the reference worker), NumPy pinned at refbench's 2.5.4 (bench/refs.txt), interleaved rounds, load gate. fft rows include the plan on both sides.
  • Data: every array is built in Go and NumPy from the same expression; TestDataParity compares the SHA-256 of both sides (24 distinct argument sets, complex ones included, all equal) and TestRefSmoke runs every NumPy call once (go test -perf.parity, run here before opening this PR).
  • docs/perf-table.md and docs/perf.json are generated. The table is deferred: the host was at a 1-minute load of 8 to 80, so only allocation counts are recorded, no timing verdict. A timing run at a quiet load replaces it.
  • docs/perf.md is now the method page; the old multicore page is kept as docs/perf-history.md with a banner (its kernel analysis is still referenced). README.md no longer quotes the multicore ratios; BENCHMARKS.md carries a "not a verdict" banner.
  • CI: new perf job (allocation counts, table regeneration check, public-function inventory), with GOMAXPROCS=1 in the environment because go-fft/fft reads it once at init (parallel.go reads GOMAXPROCS once at init: N-D transforms stay multi-core after GOMAXPROCS is lowered go-fft/fft#107).

Issues

The timing measurement of the 256 rows (and an issue per slower row from refbench issues) is the follow-up once the load allows it.

🤖 Generated with Claude Code

tannevaled and others added 2 commits November 8, 2026 12:36
…lticore page

docs/perf.md compared multicore Go with single-threaded NumPy 2.2.4. The
benchmarks move to bench/ (refbench v0.1.2, rbtest.Perf): one core on both
sides, the pinned NumPy 2.5.4, interleaved rounds, a load gate, 256 rows (one
per public function, or a named exemption in docs/perf-exempt.md), and a CI
perf job on allocation counts. The old page is kept as docs/perf-history.md
with a banner; docs/perf.md is now the method page and docs/perf-table.md is
generated. The table is deferred (load 8-80): allocation counts only.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit 97aaaa7 into main Nov 8, 2026
13 checks passed
@tannevaled
tannevaled deleted the perf/refbench-w3 branch November 8, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf: docs/perf.md compares multicore Go with single-threaded NumPy 2.2.4; re-measure on one core against the pinned NumPy

1 participant