serge-ss-paille
serge-ss-paille on Hacker News
A Hidden Weakness
Bit twiddling hack to quickly create a bitset from an array of boolean
Experiments with Byte Matrix Multiplication
Reducing the ecological impact of computing through education and Python comp
Pythran 0.9.7 released and compared to numba and stock Python
Basic value range analysis for Pythran programs
Some benchmarks here: http://serge-sans-paille.github.io/pythran-stories/testing-p...
Some more benchmark you can run on you own: 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...
Pythran – a compiler for Python scientific kernels – release
Pythran Compiler Release
Static Analysis of Python Programs with Beniget
Pythran Case Study: Simulated Annealing Applied to the TSP
New Release of the Pythran Compiler for Numeric Python
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.
Pythran as a bridge between fast prototyping and code deployment
What is the air speed velocity of Pythran?
Testing Pythran on random kernels
An Incursion into Basic ML – Gradient Descent Compiled with Pythran
One should read
def rosen_explicit_loop(x):
s = 0.
n = x.shape[0]
for i in range(0, n - 1):
s += 100. * (x[i + 1] - x[i] ** 2.) ** 2. + (1 - x[i]) ** 2
return s
(edited)The idea of the change was that it's more important to convey the problem it solves rather than how it's done ;-)