3 ms·
Alas, CPython isn’t an optimizing compiler, it faithfully compiles code into bytecode which is then faithfully executed. I don’t know the state of NumPy on PyP
by oefrha 7y ago
Alas, CPython isn’t an optimizing compiler, it faithfully compiles code into bytecode which is then faithfully executed.
I don’t know the state of NumPy on PyPy since I don’t use PyPy.
- masklinn 7y agonumba.jit might be able to optimise the extra copies away though, I'm reasonably sure working with numpy arrays is a pretty significant use case.
- ben509 7y agoThere's another project, Pythran, that does that. I'm not sure if it's doing inlining before the laziness analysis, which would be ideal. [1]: https://pythran.readthedocs.io/en/latest/INTERNAL.html#lazyness https://pythran.readthedocs.io/en/latest/INTERNAL.html#lazyn...
- anoncake 7y agoIt does have a peephole optimizer.