Pyrex and weave.accelerate
eric
eric at enthought.com
Mon Apr 8 15:33:08 EDT 2002
>
> Where Eric alludes to scientific needs, he is
> referring to array/field acceleration. Now
> the initial target of weave is Numpy arrays...
>
>
> def div(u):
> d = zeros(len(u),'d')
> for i in range(len(u)-1):
> d[i] = u[i+1]-u[i]
> return d
>
> So, weave.accelerate tries to replace function calls with
> equivalent C/C++ code.
I'm also alluding to creating C/C++ versions of Python functions
that have a standard C calling convention (instead of the self, args)
stuff that has to be parsed on function calls. If a pure C version
is possible, scientific codes that call the function a zillion
times can do so at the speed of C instead of having to callback
into python. This is important for a lot of scientific codes
that have been wrapped for use in Python.
eric
More information about the Python-list
mailing list