diff options
author | mattip <matti.picus@gmail.com> | 2023-02-01 16:33:06 +0200 |
---|---|---|
committer | mattip <matti.picus@gmail.com> | 2023-02-01 16:33:06 +0200 |
commit | 6541cf5c607a3b9500d04551dc28bfbecd1fc7a6 (patch) | |
tree | b0e394a6ad9ccc84ce2a1e45315299272de3f0c1 /doc | |
parent | ec1a4345d66992a56de6207e692ae7586fca2042 (diff) | |
download | numpy-6541cf5c607a3b9500d04551dc28bfbecd1fc7a6.tar.gz |
DOC: add a performance release note
Diffstat (limited to 'doc')
-rw-r--r-- | doc/release/upcoming_changes/23136.performance.rst | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/release/upcoming_changes/23136.performance.rst b/doc/release/upcoming_changes/23136.performance.rst new file mode 100644 index 000000000..560f35885 --- /dev/null +++ b/doc/release/upcoming_changes/23136.performance.rst @@ -0,0 +1,17 @@ +``ufunc.at`` can be much faster +------------------------------- +If called on ufuncs with appropriate indexed loops, ``ufunc.at`` can be up to +60x faster. Generic ``ufunc.at`` can be up to 9x faster. The conditions for +any speedup:: + +- contiguous arguments +- no casting + +The conditions for the extra speedup:: + +- calling the ufuncs ``add``, ``subtract``, ``multiply``, ``divide`` (and + ``floor_divide``) +- 1d arguments + +The internal logic is similar to the logic used for regular ufuncs, which also +have a fast path for contiguous, non-casting, 1d arrays. |