[Numpy-svn] [numpy/numpy] b731d4: ENH: intern some commonly used strings in umath mo...
GitHub
noreply at github.com
Tue Dec 3 14:31:13 EST 2013
Branch: refs/heads/master
Home: https://github.com/numpy/numpy
Commit: b731d4dd67f5c6851eb439d50b3606d23c371c64
https://github.com/numpy/numpy/commit/b731d4dd67f5c6851eb439d50b3606d23c371c64
Author: Julian Taylor <jtaylor.debian at googlemail.com>
Date: 2013-11-26 (Tue, 26 Nov 2013)
Changed paths:
M numpy/core/src/umath/ufunc_object.c
M numpy/core/src/umath/ufunc_object.h
M numpy/core/src/umath/umathmodule.c
Log Message:
-----------
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
Commit: 8ff4c66af5d054ec901f74909a995fd8c31900ef
https://github.com/numpy/numpy/commit/8ff4c66af5d054ec901f74909a995fd8c31900ef
Author: Julian Taylor <jtaylor.debian at googlemail.com>
Date: 2013-11-26 (Tue, 26 Nov 2013)
Changed paths:
M numpy/core/src/umath/ufunc_object.c
Log Message:
-----------
ENH: skip redundant checking of subok keyword in _find_array_prepare
all currently existing callers only call this function if subok has
already been checked to be true, but keep the code to make clear it has
to be checked.
Commit: 043e3574f3bdd72f786fe2bef44fd51baa5524fe
https://github.com/numpy/numpy/commit/043e3574f3bdd72f786fe2bef44fd51baa5524fe
Author: seberg <sebastian at sipsolutions.net>
Date: 2013-12-03 (Tue, 03 Dec 2013)
Changed paths:
M numpy/core/src/umath/ufunc_object.c
M numpy/core/src/umath/ufunc_object.h
M numpy/core/src/umath/umathmodule.c
Log Message:
-----------
Merge pull request #4058 from juliantaylor/intern-strings
ENH: intern some commonly used strings in umath module
Compare: https://github.com/numpy/numpy/compare/05ab6f4dd3b3...043e3574f3bd
More information about the Numpy-svn
mailing list