News for hackers. Stuff that matters.
Re:Pythran as a bridge between fast prototyping and code dep... by ktta on Thursday November 29, 2018 @09:23AM (#18560299)
Can't edit on my app, but the first question was for the blog post writer and my second to the submitter
Re:Pythran as a bridge between fast prototyping and code dep... by serge-ss-paille on Thursday November 29, 2018 @10:00AM (#18560617)
> could you tell us the shortcomings of Cython

In order to achieve top performance, in the context of numerical simulations, you generally end up explicity writing the loops are implicit in high-level numpy (less abstraction).

Cython does not perform any high-level optimisation on the code, while Pythran does. For instance Pytrhan computes whether an array index may be negative or not, and generates wraparound only when needed. On the otherhand Cython requires a compiler directive to do so.

That being said, Cython can do plenty of stuff Pythran cannot: import native libraries, wrap classes, mixed Python/native mode etc. It has a much stronger codebase (more tested/validated) and a larger community.

Re:Pythran as a bridge between fast prototyping and code dep... by jeanl on Thursday November 29, 2018 @12:28PM (#18561899)
For me, the biggest shortcoming: Cython does not create independent C++ code (independent of the python interpreter that is) that can be used in a separate C++ code base. My main point is that pythran makes it possible to deploy python/numpy code as C++ code.
Re:Pythran as a bridge between fast prototyping and code dep... by ktta on Thursday December 06, 2018 @08:28PM (#18624335)
I didn't realize you're the author of the blog post!

Thanks to both of you for the reply