[Numpy-discussion] Numpy and PEP 343

Charles R Harris charlesr.harris at gmail.com
Tue Feb 28 19:42:01 EST 2006

On 2/28/06, Paul F. Dubois <paul at pfdubois.com> wrote:
> You're reinventing C++ expression templates, although since Python is

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.


More information about the NumPy-Discussion mailing list