summaryrefslogtreecommitdiff
path: root/numpy/array_api/_manipulation_functions.py
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2021-05-13 15:55:46 -0700
committerSebastian Berg <sebastian@sipsolutions.net>2021-05-13 21:17:51 -0700
commitb0e37849a62255158bff16bbd4f5f90ab1aef638 (patch)
treef8ef4a2b5b03cce74f32ac5177a98163fc372d06 /numpy/array_api/_manipulation_functions.py
parentfb4ea911607a81ef6633b857122e34229075705e (diff)
downloadnumpy-b0e37849a62255158bff16bbd4f5f90ab1aef638.tar.gz
MAINT: Small cleanups in `PyArray_NewFromDescr_int`
I admit, the start of this was that I noticed that `memcpy` is using a significant chunk of time in the array creation. `memcpy` is typically optimized for fairly large copies, and seems to be just slow here, replacing it gives a ~10% boost in array creation. We can get another small boost by skipping the contiguity flag reset. But mostly, I think this cleans up the code a bit :).
Diffstat (limited to 'numpy/array_api/_manipulation_functions.py')
0 files changed, 0 insertions, 0 deletions