Skip to content

deps: go-simd/floats v0.42.0 - #132

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

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

Conversation

@tannevaled

@tannevaled tannevaled commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Refs go-simd/floats#93

What

Bumps github.com/go-simd/floats from v0.41.0 to v0.42.0 (go.mod, go.sum, bench/go.mod, bench/go.sum). No ndarray code changes. v0.42.0 changes amd64 only: Div32 on Zen 3 uses 128-bit loads and stores feeding a 256-bit VDIVPS.

Performance (Div f32 rows only)

Same method as #131: kernel benchmark Bin32 (div), linux/amd64 test binaries cross-compiled from main 4669ef1 ("before", floats v0.41.0) and from this branch ("after", floats v0.42.0), cfarm420 (AMD EPYC 7773X, Zen 3), taskset -c 9, GOMAXPROCS=1, NumPy 2.5.5 from ~/npvenv with OMP/OPENBLAS/MKL_NUM_THREADS=1 (np.divide with out= preallocated). 15 interleaved rounds (order of before/after/before2 rotated each round, NumPy once per round), medians, ns/op. "before2" is the same before binary run again every round (A/A).

Load: /proc/loadavg 1-minute was 5.16 at the start and 2.73 at the end (both below 8). Caveat: the 15-minute average was 40.4 at the start (a heavy period had just ended; a first check 2 minutes earlier read 37), so the first rounds ran in a machine that was settling; the 1-minute figure stayed between 2.7 and 4.4 from round 1 on.

row before (v0.41.0) after (v0.42.0) A/A (before2) NumPy after/before A/A before2/before after/NumPy
Div f32 n=1e3 138.5 139.4 137.6 629.5 1.006 0.994 0.221
Div f32 n=1e5 18720 17789 18556 18177 0.950 0.991 0.979
Div f32 n=1e6 186708 181728 186544 175614 0.973 0.999 1.035

Against the bar (after/NumPy at most 1.00 at 1e5 and 1e6, or within the A/A spread):

  • 1e5: met, 0.979 of NumPy (before: 1.030 in this run). After is 5 % faster than before, outside the A/A spread (0.991).

  • 1e6: not met. After/NumPy is 1.035 (before: 1.063). The bump is 2.7 % faster than before (A/A 0.999, so outside the noise of this method), but Div f32 at 1e6 is still 3.5 % slower than NumPy on Zen 3. It is memory-bound.

    Follow-up (2026-11-23): go-simd ran floats' own BenchmarkDiv32, this repo's benchmark binary and NumPy 2.5.5 side by side on cfarm420. Setup: 2 runs × 9 interleaved rounds, n=1e6, load 3 to 7. Every minimum sits at the same ~163 µs memory floor, NumPy's included (floats 162 to 164, this binary 163.5 to 164.7, NumPy 163.4 to 165.4). Data pattern, alignment and the call path are ruled out; medians differ by up to ~10 µs with the host spread. Verdict: Div32 at 1e6 at parity with NumPy on Zen 3 (same ~163 µs minimum); medians differ within host spread. A ~5 µs residual between this binary's median and floats' in-process one remains unexplained. Not an open defect.

  • 1e3: unchanged (1.006, A/A 0.994), 4.5x faster than NumPy.

Not measured: the other Div f32 sizes, arm64 and the other architectures (v0.42.0 changes amd64 only).

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.41.0 to v0.42.0 (go.mod, go.sum,
and bench/ for ndarray). v0.42.0 changes amd64 only: Div32 on Zen 3 uses
128-bit loads and stores feeding a 256-bit VDIVPS. No API change.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit e222966 into main Nov 23, 2026
13 checks passed
@tannevaled
tannevaled deleted the deps/floats-v0.42.0 branch November 23, 2026 02:41
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