Skip to content

deps: go-simd/floats v0.41.0 - #131

Merged
tannevaled merged 1 commit into
mainfrom
deps/floats-v0.41.0
Nov 22, 2026
Merged

tannevaled merged 1 commit into
mainfrom
deps/floats-v0.41.0

Conversation

@tannevaled

@tannevaled tannevaled commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Refs #98

What

Bumps github.com/go-simd/floats from v0.35.0 to v0.41.0 (go.mod, go.sum, bench/go.mod, bench/go.sum). No ndarray code changes: every floats function ndarray calls compiles unchanged. Between the two versions floats changed: v0.38.0 arm64 multi-accumulator reductions and small-n fixes; v0.39.0 and v0.40.0 POWER9 CMulTo; v0.41.0 is the latest release.

Performance

Same rows and method as #129: kernel benchmarks (internal/kernels: dotSIMD, MatVecP, Bin32, Sqrt32), linux/amd64 test binaries cross-compiled from the merge base c769cca ("before", floats v0.35.0) and from this branch ("after", floats v0.41.0), on cfarm420 (AMD EPYC 7773X, Zen 3, AVX2, no AVX-512), taskset -c 9, GOMAXPROCS=1, NumPy 2.5.5 from ~/npvenv with OMP/OPENBLAS/MKL_NUM_THREADS=1 (out= preallocated). 9 interleaved rounds, the order of before/after/before2 rotated each round, NumPy once per round; medians; ns/op, lower is better.

Load: /proc/loadavg 1-minute was 2.65 at the start and 4.24 at the end (both below 8, valid); it stayed between 3.0 and 4.6 between rounds.

A/A pair: "before2" is the SAME before binary run again in every round (copied under another name). Its ratio to before is the noise of this method: it ranges from 0.981 to 1.043 over the 19 rows, and is 1.015 and 1.029 on Div f32 1e5 and 1e6.

row before after A/A (before2) NumPy after/before A/A before2/before after/NumPy
Dot f64 n=1e3 87.8 87.6 87.7 870.6 0.998 0.999 0.101
Dot f64 n=1e5 22119 22780 21708 22695 1.030 0.981 1.004
Dot f64 n=1e6 219794 219831 220253 228946 1.000 1.002 0.960
MatVec f64 1024x1024 134441 134899 135844 151154 1.003 1.010 0.892
Add f32 n=1e3 48.8 48.7 49.1 581.1 1.000 1.007 0.084
Add f32 n=1e5 16427 16936 16333 17051 1.031 0.994 0.993
Add f32 n=1e6 168487 169090 168748 166388 1.004 1.002 1.016
Sub f32 n=1e3 49.4 49.8 49.6 584.1 1.008 1.006 0.085
Sub f32 n=1e5 16613 16653 16465 16989 1.002 0.991 0.980
Sub f32 n=1e6 169244 170257 169133 167731 1.006 0.999 1.015
Mul f32 n=1e3 48.8 48.9 50.9 584.5 1.003 1.043 0.084
Mul f32 n=1e5 16648 16768 16603 17268 1.007 0.997 0.971
Mul f32 n=1e6 167300 169082 169099 167579 1.011 1.011 1.009
Div f32 n=1e3 136.9 137.1 137.1 604.4 1.001 1.001 0.227
Div f32 n=1e5 17464 17873 17734 17063 1.023 1.015 1.047
Div f32 n=1e6 177739 182453 182961 167586 1.027 1.029 1.089
Sqrt f32 n=1e3 196.3 196.1 196.0 845.7 0.999 0.998 0.232
Sqrt f32 n=1e5 20197 19854 20035 40376 0.983 0.992 0.492
Sqrt f32 n=1e6 198681 200937 199980 397168 1.011 1.007 0.506

Reading it:

  • The bump changes nothing measurable on amd64: after/before is 0.98 to 1.03 and the A/A pair spans 0.98 to 1.04, so every row is within the method's noise except two. Dot f64 n=1e5 (after/before 1.030, A/A 0.981) and Add f32 n=1e5 (1.031, A/A 0.994) read about 3 % slower than before with an A/A below 1; both are open defects until a second run says otherwise (the previous quiet-load run of perf: float64 dot and float32 Add/Sub/Mul/Div/Sqrt on go-simd/floats; delete the private kernels #129 read Dot 1e5 at 0.963). Rows where after/before is above 1.000 but inside the A/A spread (Sub, Mul, Div, Sqrt 1e6, MatVec) are not claimed as regressions or as noise-free.
  • Div f32 against NumPy: 1.047 at n=1e5 and 1.089 at n=1e6, at quiet load. The "before" binary reads 1.023 and 1.061 against the same NumPy, so the gap is not made by this bump (after/before 1.023 and 1.027 sit within an A/A of 1.015 and 1.029); floats v0.41.0 does not close it. Div32 4.7-8.9% slower than NumPy past L2 on Zen 3; perf: Div32 4.7-8.9% slower than NumPy past L2 on Zen 3 (memory side, not the divider) go-simd/floats#93. NumPy's time at 1e6 is the memory floor that Add32/Mul32 reach, so the gap is in floats' AVX2 Div32 on the memory side, not in the divider.
  • Not measured: arm64 (the v0.38.0 change), POWER9, loong64, riscv64, s390x. The benchmark file and the NumPy script are not in the repo; they time the same data pattern on both sides.

Checks run locally: gofmt -l empty, go test ./... green, buildscan --vet clean under all 21 CI configurations.

🤖 Generated with Claude Code

Bumps github.com/go-simd/floats from v0.35.0 to v0.41.0 in go.mod and
bench/go.mod. No API used by ndarray changed in between (v0.38.0: arm64
multi-accumulator reductions and small-n fixes; v0.39.0 and v0.40.0:
POWER9 CMulTo; v0.41.0: see the PR body).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.

1 participant