[pypy-dev] How's the JIT coming along?
santagada at gmail.com
Wed Aug 22 06:43:01 CEST 2007
Em Aug 21, 2007, às 11:22 PM, David Cournapeau escreveu:
> I cannot speak for Garry, but I myself would be interested in pypy for
> numerical computing in python. Basically, there are cases where
> numpy is
> not enough and require coding in C. The two cases I am thinking are:
> - recursive algorithms: this means many functions calls, which are
> too expensive in python (eg: imagine you have a two buffers of many
> float x, and you want to compute f(x[i], [y[i], nu[i]) = x[i+1] = x
> [i] +
> nu[i] * (x[i] - y[i]); even using ctypes for the trivial
> computation in
> C kills performances because of the many calls)
> - algorithms which require many temporaries to be efficient in
> Both of them, if my understanding is right, would be perfect
> exemples of
> easy to optimize using JIT.
I'm guessing here, but to my knoledge to make python functions more
lightweight using jit would only work by making tail call
optimization, but for that you can also do the "same" optimization by
using a explicit stack and not use function calls at all.
More information about the Pypy-dev