[Python-Dev] [numpy wishlist] Interpreter support for temporary elision in third-party classes (original) (raw)
Sturla Molden sturla.molden at gmail.com
Sat Jun 7 04🔞35 CEST 2014
- Previous message: [Python-Dev] [numpy wishlist] Interpreter support for temporary elision in third-party classes
- Next message: [Python-Dev] asyncio/Tulip: use CPython as the new upstream
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Nathaniel Smith <njs at pobox.com> wrote:
with numpy.accelerate: x = y = z = # evaluation of x,y,z happens here Using an alternative evaluation engine is indeed another way to optimize execution, which is why projects like numexpr, numba, theano, etc. exist. But this is basically switching to a different language in a different VM.
I was not thinking that complicated. Let us focus on what an unmodified CPython can do.
A compound expression with arrays can also be seen as a pipeline. Imagine what would happen if in "NumPy 2.0" arithmetic operators returned coroutines instead of temporary arrays. That way an expression could be evaluated chunkwise, and the chunks would be small enough to fit in cache.
Sturla
- Previous message: [Python-Dev] [numpy wishlist] Interpreter support for temporary elision in third-party classes
- Next message: [Python-Dev] asyncio/Tulip: use CPython as the new upstream
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]