summaryrefslogtreecommitdiff
path: root/numpy/lib/nanfunctions.py
diff options
context:
space:
mode:
authorJulian Taylor <jtaylor.debian@googlemail.com>2014-05-26 21:43:40 +0200
committerJulian Taylor <jtaylor.debian@googlemail.com>2014-05-26 21:53:47 +0200
commit25518e5833b1590f849e189941173563ef2548e1 (patch)
treece252ca02f951e3bf66c4441a0d5d95572a2cbe8 /numpy/lib/nanfunctions.py
parente4dc0c9c0a094844e2db60685a59eebe9b6a2bbb (diff)
downloadnumpy-25518e5833b1590f849e189941173563ef2548e1.tar.gz
ENH: improve VOID_compare performance
use small memory cache for the temporary data allocation in the compare loop and use npy_is_aligned instead of the very expensive signed division. Improves unaligned compares which occur in structured arrays with strings: d = np.ones((2,10000), dtype=np.dtype([('f0', 'S5'), ('f1', '<i4')])) %timeit np.argsort(d) 100 loops, best of 3: 8.6 ms per loop vs before: 100 loops, best of 3: 23.7 ms per loop
Diffstat (limited to 'numpy/lib/nanfunctions.py')
0 files changed, 0 insertions, 0 deletions