[Numpy-discussion] Proposed Roadmap Overview
Sturla Molden
sturla@molden...
Mon Feb 20 11:44:50 CST 2012
Den 20.02.2012 18:18, skrev Dag Sverre Seljebotn:
>
> I think it is moot to focus on improving NumPy performance as long as in
> practice all NumPy operations are memory bound due to the need to take a
> trip through system memory for almost any operation. C/C++ is simply
> "good enough". JIT is when you're chasing a 2x improvement or so, but
> today NumPy can be 10-20x slower than a Cython loop.
>
> You need at least a slightly different Python API to get anywhere, so
> numexpr/Theano is the right place to work on an implementation of this
> idea. Of course it would be nice if numexpr/Theano offered something as
> convenient as
>
> with lazy:
> arr = A + B + C # with all of these NumPy arrays
> # compute upon exiting...
>
>
Lazy evaluation is nice. But I was thinking more about how to avoid C++
in the NumPy core, so more than 2 or 3 programmers could contribute.
I.e. my point was not that loops in LLVM would be much faster than C++
(that is besides the point), but the code could be written in Python
instead of C++.
But if the idea is to support other languages as well (which I somehow
forgot), then this approach certainly becomes less useful.
(OTOH, lazy evaluation is certainly easier to achieve with JIT
compilation. But that will have to wait until NumPy 5.0 perhaps...)
Sturla
More information about the NumPy-Discussion
mailing list