[Numpy-discussion] Numpy and PEP 343

Travis Oliphant oliphant.travis at ieee.org
Tue Feb 28 19:55:04 CST 2006

Charles R Harris wrote:

>Yes indeedy, and although they might work well enough they produce the
>most godawful looking assembly code I have ever looked at. The boost
>ublas template library takes this approach and I regard it more as a
>meta-compiler research project written in a template language than as
>an array library. I think that there are two main users of arrays:
>those who want quick and convenient (optimize programmer time) and
>those who want super-fast execution (optimize cpu time). Because a
>human can generally do a better job and knows more about the intent
>than the average compiler, I think that the best bet is to provide the
>tools needed to write efficient code if the programmer so desires, but
>otherwise concentrate on convenience. When absolute speed is essential
>it is worth budgeting programmer time to achieve it, but generally I
>don't think that is the case.
I think this is ultimately why nothing has been done except to make it 
easier and easier to write compiled code that gets called from Python.

I'm sure most have heard that ctypes will be added to Python 2.5.  This 
will make it very easy to write a C function to do what you want and 
just call it from Python.

Weave can still help with the "auto-compilation" of the specific library 
for your type.  Ultimately such code will be faster than NumPy can every 


More information about the Numpy-discussion mailing list