Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ same `versions.json` (mike's format).

## Mirrored pages

Six pages are copies of files in `go-ndarray/ndarray`, kept verbatim so that
Seven pages are copies of files in `go-ndarray/ndarray`, kept verbatim so that
re-syncing them is a copy, not an edit:

| Page | Mirrors | What is ours |
Expand All @@ -50,10 +50,11 @@ re-syncing them is a copy, not an edit:
| `content/en/linalg.md` | [`docs/linalg.md`](https://github.com/go-ndarray/ndarray/blob/main/docs/linalg.md), below its `#` title | the front matter |
| `content/en/random.md` | [`docs/random.md`](https://github.com/go-ndarray/ndarray/blob/main/docs/random.md), below its `#` title | the front matter |
| `content/en/roadmap.md` | [`docs/plan-ndarray.md`](https://github.com/go-ndarray/ndarray/blob/main/docs/plan-ndarray.md), below its `#` title | the front matter |
| `content/en/performance.md` | [`docs/perf.md`](https://github.com/go-ndarray/ndarray/blob/main/docs/perf.md), from the heading `## How a pure-Go library can beat NumPy` to the end | the front matter, and the introduction and *Where it stands* summary above that heading |
| `content/en/performance.md` | [`docs/perf.md`](https://github.com/go-ndarray/ndarray/blob/main/docs/perf.md), below its `#` title (the one-core method page; the table, the inventory and the exemptions are linked on GitHub) | the front matter |
| `content/en/performance-history.md` | [`docs/perf-history.md`](https://github.com/go-ndarray/ndarray/blob/main/docs/perf-history.md), from the heading `## How a pure-Go library can beat NumPy` to the end | the front matter, and the banner, introduction and *Where it stands* summary above that heading |
| `content/en/security.md` | [`SECURITY.md`](https://github.com/go-ndarray/ndarray/blob/main/SECURITY.md), from `## Reporting` to the end | the front matter and the `> Mirrored from … at vX.Y.Z` line; repository-relative references are rewritten as GitHub links (`this repository` → `[the repository](https://github.com/go-ndarray/ndarray/security)`, `` `fuzz_test.go` `` → ``[`fuzz_test.go`](https://github.com/go-ndarray/ndarray/blob/main/fuzz_test.go)``, …) |

The first five are re-synced by one command, from a checkout of ndarray at tag
The first six are re-synced by one command, from a checkout of ndarray at tag
`vX.Y.Z` (`$ND`); it refuses a checkout that is not at that tag:

```sh
Expand Down
27 changes: 10 additions & 17 deletions content/en/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,28 +108,20 @@ correct where amd64's `math.Exp` returns +Inf
is wrong on subnormals
([golang/go#56600](https://github.com/golang/go/issues/56600)).

**Measured against NumPy 2.5.3 (OpenBLAS 0.3.34) on an AMD Zen 3, 16 cores:**

- **Faster:** whole-array reductions (`Sum`/`Mean`/`Max` at 4 Mi: 2.3–4.5×),
row reductions (`SumAxis(1)` 2.2×, `MaxAxis(1)` 1.7×), `Exp` from 256 Ki
elements (2.4–5.6×), and `MatMul` against single-threaded OpenBLAS
(3.7–5.9× from 512²).
- **At parity:** `SumAxis(0)`, `Inner` against 16-thread OpenBLAS, `Log` on
one core.
- **Slower:** `MatMul` against 16-thread OpenBLAS at 512² and up (0.42× at
512², 0.51× at 1024², measured in one run; at 256² ours is 1.44× faster);
`Dot` and mat·vec against NumPy's 16-thread BLAS (0.69× and 0.52× since
v0.6.0's helper pool; 0.16× before); `Exp`
below 256 Ki elements (0.82×); the *allocating* forms of elementwise ops up
to 256 Ki elements, `Concatenate`/`Stack` and slice copies outside a
`Workspace` (0.2–0.5×).
**Speed against NumPy is measured on one core, both sides**
([Performance](performance.md)): one row per public function (or a named
exemption), against the pinned NumPy 2.5.4, `GOMAXPROCS=1` and one BLAS thread,
interleaved rounds, refused at a 1-minute load of 8 or more, with the
allocation count of every row checked in CI. The earlier multicore comparison
with single-threaded NumPy is kept as [Performance history](performance-history.md)
for its kernel-level analysis; its ratios are not a verdict.

On Apple silicon the GEMM reached parity with tuned BLAS at 1024² (OpenBLAS in
an arm64 VM, single-threaded vecLib on an M4 Max) and beats the pure-Go
**gonum 4–10×**. On the other targets, against go-ndarray's own scalar code on
one core: on a RISC-V SpacemiT X60 the RVV kernels cut `Sum` by up to 5.8× and
`MatMul` time by 31–45%; on an IBM z17 the s390x kernels cut `MatMul` 1024²
from 340 to 70 ms and `Max` by 92–96% (see [Performance](performance.md),
from 340 to 70 ms and `Max` by 92–96% (see [Performance history](performance-history.md),
*SIMD coverage*).

CI runs the suite on amd64, arm64 and 386 natively and on
Expand All @@ -144,7 +136,8 @@ ppc64le, riscv64 and loong64 hardware.
- [Linear algebra](linalg.md) — `numpy.linalg`: algorithms, accuracy, speed.
- [Random numbers](random.md) — `numpy.random`, the same numbers for the same seed.
- [Roadmap](roadmap.md) — the plan and what ships today.
- [Performance](performance.md) — honest benchmarks versus NumPy / OpenBLAS.
- [Performance](performance.md) — the one-core comparison with NumPy: method, one row per function.
- [Performance history](performance-history.md) — the earlier multicore analysis, kernel by kernel.

Source: [github.com/go-ndarray/ndarray](https://github.com/go-ndarray/ndarray) ·
also the cgo-free ndarray backend behind [go-embedded-ruby](https://github.com/go-embedded-ruby/ruby)'s
Expand Down
2 changes: 1 addition & 1 deletion content/en/dtypes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: "Why the dtype is a run-time property of one Array type, how arrays
tags: [dtypes, numpy]
---

> Mirrored from [`docs/design-dtypes.md`](https://github.com/go-ndarray/ndarray/blob/v0.37.4/docs/design-dtypes.md) at v0.37.4.
> Mirrored from [`docs/design-dtypes.md`](https://github.com/go-ndarray/ndarray/blob/v0.37.5/docs/design-dtypes.md) at v0.37.5.

> Status: implemented (Phase 2). Supersedes decision 4 of
> [plan-ndarray.md](roadmap.md) ("`float64` first").
Expand Down
4 changes: 2 additions & 2 deletions content/en/linalg.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ description: "Solve, Inv, Det, Cholesky, QR, SVD, Eig and the rest of numpy.lina
tags: [linalg, numpy]
---

> Mirrored from [`docs/linalg.md`](https://github.com/go-ndarray/ndarray/blob/v0.37.4/docs/linalg.md) at v0.37.4.
> Mirrored from [`docs/linalg.md`](https://github.com/go-ndarray/ndarray/blob/v0.37.5/docs/linalg.md) at v0.37.5.

Package [`linalg`](https://pkg.go.dev/github.com/go-ndarray/ndarray@v0.37.4/linalg) gives ndarray arrays the functions of
Package [`linalg`](https://pkg.go.dev/github.com/go-ndarray/ndarray@v0.37.5/linalg) gives ndarray arrays the functions of
`numpy.linalg`, written in Go without cgo or assembly of its own: the
matrix products it relies on are the ndarray package's packed SIMD GEMM.

Expand Down
Loading
Loading