diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2021-12-08 00:44:43 -0600 |
---|---|---|
committer | Sebastian Berg <sebastianb@nvidia.com> | 2023-01-17 18:40:44 +0100 |
commit | 25ebf18c5bce80e436487461a42019063a3bf62b (patch) | |
tree | e3a0a8e2b04661a8e9992608a0018741e6d8617d /numpy/array_api/_array_object.py | |
parent | 60a858a372b14b73547baacf4a472eccfade1073 (diff) | |
download | numpy-25ebf18c5bce80e436487461a42019063a3bf62b.tar.gz |
MAINT: Move concatenate to fastcall protocol
The refactor to use vectorcall/fastcall is obviously much better
if we don't have to go back and forth, for concatenate we get:
arr = np.random.random(20)
%timeit np.concatenate((arr, arr), axis=0)
Going from ~1.2µs to just below 1µs and all the way down to ~850ns
(fluctuates quite a lot down to 822 even). ~40% speedup in total
which is not too shabby.
Diffstat (limited to 'numpy/array_api/_array_object.py')
0 files changed, 0 insertions, 0 deletions