diff options
author | Julian Taylor <jtaylor.debian@googlemail.com> | 2013-11-16 12:51:04 +0100 |
---|---|---|
committer | Julian Taylor <jtaylor.debian@googlemail.com> | 2013-11-26 19:28:30 +0100 |
commit | b731d4dd67f5c6851eb439d50b3606d23c371c64 (patch) | |
tree | 226d30305b14061b7c867acaf6bac3c8482f0a0e /numpy/lib/arraypad.py | |
parent | 78e29a323316642899f8ff85e538b785f0d5e31f (diff) | |
download | numpy-b731d4dd67f5c6851eb439d50b3606d23c371c64.tar.gz |
ENH: intern some commonly used strings in umath module
Allows using the PyObject dictionary functions instead of the costly
C-string variants.
Make use of this in some of the ufunc subtype wrapper functions.
Improvement:
a, b = np.arange(200.), np.arange(200.)
%timeit np.add(a, b, out=a)
1000000 loops, best of 3: 768 ns per loop
vs before:
%timeit np.add(a, b, out=a)
1000000 loops, best of 3: 1.03 µs per loop
Diffstat (limited to 'numpy/lib/arraypad.py')
0 files changed, 0 insertions, 0 deletions