numpy/numpy — pull request #4058 by juliantaylor (2013-11-16 12:04:31+00:00)
Title: 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