[Numpy-discussion] Status of Numeric
Paul Prescod
paul at prescod.net
Wed Jan 21 20:22:03 EST 2004
Tim Hochberg wrote:
>...
>
> The second point is the relative speediness of Numeric at low array
> sizes is the result that nearly all of it is implemented in C, whereas
> much of Numarray is implemented in Python. This results in a larger
> overhead for Numarray, which is why it's slower for small arrays. As I
> understand it, the decision to base most of Numarray in Python was
> driven by maintainability; it wasn't an attempt to optimize large arrays
> at the expense of small ones.
What about Pyrex? If you code Pyrex as if it were exactly Python you
won't get much optimization. But if you code it as if it were 90% as
maintainable as Python you can often get 90% of the speed of C, which is
pretty damn close to having all of the best of both worlds. If you point
me to a few key functions in Numarray I could try to recode them in
Pyrex and do some benchmarking for you (only if Pyrex is a serious
option of course!).
Paul Prescod
More information about the NumPy-Discussion
mailing list