Pythran: Enabling Static Optimization of Scientific Python Programs
By S. Guelton, Pierrick Brunet, A. Raynaud, Adrien Merlini, Mehdi Amini. 2013
51 citations recorded by the source corpus.
Pythran is an open source static compiler that turns modules written in a subset of Python language into native ones. Assuming that scientific modules do not rely much on the dynamic features of the language, it trades them for powerful, possibly inter-procedural, optimizations. These optimizations include detection of pure functions, temporary allocation removal, constant folding, Numpy ufunc fusion and parallelization, explicit thread-level parallelism through OpenMP annotations, false variable polymorphism pruning, and automatic vector instruction generation such as AVX or SSE. In addition to these compilation steps, Pythran provides a C++ runtime library that leverages the C++ STL to provide generic containers, and the Numeric Template Toolbox for Numpy support. It takes advantage of modern C++11 features such as variadic templates, type inference, move semantics and perfect forwarding, as well as classical idioms such as expression templates. Unlike the Cython approach, Pythran input code remains compatible with the Python interpreter. Output code is generally as efficient as the annotated Cython equivalent, if not more, but without the backward compatibility loss.
Subfields: Artificial Intelligence, Hardware and Architecture, Information Systems, Program Analysis & Verification, ML Systems & Hardware
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Artificial Intelligence
In Information Systems
In ML Systems & Hardware
Citations in the corpus
- PconsC4: fast, free, easy, and accurate contact predictions (2018, methodology): “To reduce the number of dependencies and overall run time, we re-implemented GaussDCA as a Python package using Pythran (Guelton et al. , 2015) resulting in a speedup of a factor of three.”