sympy/sympy — pull request #7839 by pbrady (2014-08-07 19:31:57+00:00)
Title: [WIP] Add numexpr option for lambdify

Sometimes numpy just isn't fast enough....

```python
In [1]: from sympy.abc import x, y, z

In [2]: from sympy import lambdify, S

In [3]: import num

In [3]: import numpy as np

In [4]: a, b, c = np.random.randn(300000).reshape((3, 100000))

In [5]: f = lambdify((x, y, z), 3*x**2+2*(y-z)+S('sin')(z**3)+S('exp')(x*y-z), modules="numpy")

In [6]: ff = lambdify((x, y, z), 3*x**2+2*(y-z)+S('sin')(z**3)+S('exp')(x*y-z), modules="numexpr")

In [7]: np.allclose(f(a, b, c), ff(a, b, c))
Out[7]: True

In [8]: %timeit(f(a, b, c))
10 loops, best of 3: 22 ms per loop

In [9]: %timeit(ff(a, b, c))
100 loops, best of 3: 2.07 ms per loop

In [10]:
```
My functions tend to be long but simple as in the example above, so I haven't tested this extensively on more complex functions. If those interested in this could post any successes/failures that would be appreciated!