Hi folks, and sorry for the double posting if any.
It's my great pleasure to announce the release of Pythran 0.9.2, codenamed
koailh.
Pythran is an ahead of time compiler for scientific kernels written in Python.
It is
backward-compatible with Python (no language extension) and can take advantage
of
OpenMP annotations and automatic SIMD instruction generation.
It's been more than four months since last release, so there's quite a lot of
changes.
The detailed changelog is available online:
https://pythran.readthedocs.io/en/latest/
Notable Changes
===============
In addition to bugfixes and new function support, the most significant changes
are the
support of a special notation to describe optional argument in Pythran
annotations:
#pythran export foo(int, int?)
This notation is equivalent to:
#pythran export foo(int)
#pythran export foo(int, int)
This release also introduces a new dependency on the beniget package that
provides use-def
chains construction for Python code:
https://github.com/serge-sans-paille/beniget
A significant memory leak when converting extended slice from pythran to python
has been
spoted and fixed.
In total, a great deal of 43 issues have been closed!
https://github.com/serge-sans-paille/pythran/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aclosed+closed%3A%3E2019-01-20+
Sample Code
===========
As usual, I like to demonstrate Pythran through a small benchmark that used to
be unsupported
and now provides a nice x6 speedup (without xsimd) up to (with xsimd,
non-strided version) over
Python reference:
import numpy as np
#pythran export f_dist(float64[:,:], float64[:,:])
#pythran export f_dist(float64[::,::], float64[::,::])
def f_dist(X1, X2):
return np.sum(np.abs(X1[:, None, :] - X2), axis=-1)
(from
https://stackoverflow.com/questions/55854611/efficient-way-of-vectorizing-distance-calculation/)
Download
========
You can retrieve the package through PyPI:
https://pypi.org/project/pythran/
Download the source on GitHub:
https://github.com/serge-sans-paille/pythran
Or using the conda package, now available for Windows in addition to Linux and
OSX through conda-forge
https://anaconda.org/conda-forge/pythran
Thanks
======
The following people have contributed to this version, through bug reports or
commits, in no
particular order:
- Yann Diorcet
- Neal Becker
- Ashwin Vishnu
- David Menéndez Hurtado
- Jean Laroche
- Anubhab Haldar
- Thierry Dumont
- "keke ge-smile"
- "garanews"
- Said Hadjout
- Rodrigo Iga
- Pierrick Brunet
- Franck Cornevaux-Juignet
Special thoughts to these last two, they reported bugs in 2013 and 2014, and
the associated
fixes only happened in 2019 ^^!
Contribute
==========
If you've been brave enough to read this whole mail, the next step is to
support Pythran!
You can donate your time through bug reports and fixes, give a small motivation
boost through
a gentle email, or just use it and share the joy.
If you need important development in Pythran, you can drive the roadmap! Send
an email to the
mailing list (or to my personnal email if you're too shy).
++
Serge