Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



It does have a peephole optimizer.


numba.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.


There'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#lazyn...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: