Skip to content
Merged
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: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,11 @@ for step := 0; step < steps; step++ {

After the first pass nothing is allocated, nothing is zeroed that the kernel
overwrites anyway, and the memory stays warm in cache: `x + y` on 1 024
elements goes from 2.6 µs to 0.38 µs (2.1× NumPy), `sqrt(x*y + x)` on 256 Ki
from 1.18 ms to 0.39 ms (7.5× NumPy). ⚠ An array allocated from the workspace
elements goes from 2.6 µs to 0.38 µs, and `sqrt(x*y + x)` on 256 Ki from
1.18 ms to 0.39 ms. Those two figures compare Go with Go. The NumPy figures once
quoted beside them came from multicore runs. On one core, the allocating
forms are about 3× slower than NumPy, while the preallocated `*Into` forms tie
with it ([docs/perf.md](docs/perf.md), #118). ⚠ An array allocated from the workspace
is invalid after `Reset`; `Detach` is how a result leaves it. The `*Into`
methods (`AddInto`, `SqrtInto`, …) remain the way to reuse one named buffer.

Expand Down
Loading