
Pythran – a compiler for Python scientific kernels – release - serge-ss-paille
http://serge-sans-paille.github.io/pythran-stories/pythran-094-hollsent.html
======
mratsim
I know Pythran from the Julia challenge [1]

but you should link to some docs / examples / tutorials in this thread because
the release notes doesn't do justice of what Pythran can do.

[1] [https://github.com/SimonDanisch/julia-
challenge/pull/4](https://github.com/SimonDanisch/julia-challenge/pull/4)

~~~
contravariant
If you have some time would you mind sharing some of your thoughts about
Pythran? I'm curious but wouldn't really know where to start looking.

------
serge-ss-paille
More materials for the curious:

Some benchmarks here: [http://serge-sans-paille.github.io/pythran-
stories/testing-p...](http://serge-sans-paille.github.io/pythran-
stories/testing-pythran-on-random-kernels.html)

Some more benchmark you can run on you own: [https://github.com/serge-sans-
paille/numpy-benchmarks/](https://github.com/serge-sans-paille/numpy-
benchmarks/)

A comparison with Julia and native code: [http://serge-sans-
paille.github.io/pythran-stories/micro-ben...](http://serge-sans-
paille.github.io/pythran-stories/micro-benchmarking-julia-c-and-pythran-on-an-
economics-kernel.html)

------
chenzhekl
How does it compare to Numba and Cython?

~~~
mattip
Here is a nice comparison [https://flothesof.github.io/optimizing-python-code-
numpy-cyt...](https://flothesof.github.io/optimizing-python-code-numpy-cython-
pythran-numba.html)

Tl;dr: pythran is very similar to numba but blazingly fast on cpu

~~~
mlthoughts2018
The Cython example in that link is actually not a fair comparison, since it
still forces the numpy ndarray type in the signature.

Instead it should use typed memoryviews [0], which are faster and can avoid
more cases that will rely on the GIL accidentally (such as when an ndarray has
to be treated as a Python object).

[0]:
[https://cython.readthedocs.io/en/latest/src/userguide/memory...](https://cython.readthedocs.io/en/latest/src/userguide/memoryviews.html)

