summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authormattip <matti.picus@gmail.com>2023-02-01 16:33:06 +0200
committermattip <matti.picus@gmail.com>2023-02-01 16:33:06 +0200
commit6541cf5c607a3b9500d04551dc28bfbecd1fc7a6 (patch)
treeb0e394a6ad9ccc84ce2a1e45315299272de3f0c1 /doc
parentec1a4345d66992a56de6207e692ae7586fca2042 (diff)
downloadnumpy-6541cf5c607a3b9500d04551dc28bfbecd1fc7a6.tar.gz
DOC: add a performance release note
Diffstat (limited to 'doc')
-rw-r--r--doc/release/upcoming_changes/23136.performance.rst17
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.