RSSAmplifier

Blog

Pythran stories

serge-sans-paille.github.ioRSS feed ↗35 posts

Latest posts

A Hidden Weakness

A surprising combination of symbol qualifiers that lead to a long bug hunt.

Trivial Auto Var Init Experiments

exploring the impact of -ftrivial-auto-var-init on Firefox codebase

-Wglobal-constructors

What's worse than a global variable? A global variable initialized at startup!

Shrinking a Shared Library

What is the effect of different compiler flags on the size of a shared library? Let's explore!

How unity builds crept into the Firefox Build System

Jumbo builds make C++ code compilation faster, but what happens when you require them?

GSoC’21 Improve performance through the use of Pythran

This project is about using Pythran to accelerate algorithms in SciPy and writing benchmarks for the algorithms. Let's look into the details of the project.

xsimd - again

Not stricly a post about Pythran, but about one of its component: xsimd, the vectorization engine we (optionally) use. And more specifically about a new forthcoming feature of it: dispatching call based on supported instruction set.

Pythran 0.9.7 - memes tra

Pythran version bump, supporting Python 3.9, fixing a few performance issues and benchmarking the release.

Basic Value Range Analysis

Pythran recently gained a significant improvment in its value range analysis. Let's discuss some implementation details through a bunch of examples.

Pythran 0.9.4 - Hollsent

Pythran version bump, bringing a lot of unexpected features in!

Gast, Beniget! Use-Def chains for Python Programs

Many tools manipulate the Python AST to analyse or transform it. Let's propose a collection of analyse those tools can leverage on: beniget .

Source-to-source transformation of a Python kernel

Pythran can also be used as a source-to-source transformation engine. This post showcases some recent transformation on a high-level code.

Pythran 0.9.1 is out!

Pythran version bump, new PyPI packages + Conda release, Changelog and comments.

Pythran as a bridge between fast prototyping and code deployment

How pythran can be use to bridge the divide between fast prototyping and code deployment

Getting the best of every world: Cython and Pythran working together

Once upon a time, on IRC, Serge Guelton asked me whether I wanted to work on having Cython using Pythran for Numpy-related computation. I wasn't really sure what I was getting into, but I've always liked optimizing software, and that sounded like an interesting challenge to understand both projects. As …

Bye bye boost.simd, welcome xsimd

After five years of friendship, Pythran replaces boost.simd by xsimd as its vectorization engine. This post goes through the motivation of this change, and the advantage of this move.

What is the air speed velocity of Pythran?

Performance of the compiled code is an important feature of Pythran. Yet, Pythran had no unit test to prevent performance regression! Fortunately, thanks to a mix of airspeed velocity and numpy-benchmark , it is now a granted a decent way to track these regressions.

Testing Pythran on random kernels

Stack Overflow is a great place to find new challenging test case for Pythran :-)

An incursion into basic ML - Gradient Descent compiled with Pythran

Or how to compile a basic kernel from the machine learning field with Pythran.

Shrinking Pythran-Generated Binaries

Following a thread on scipy-dev , I've started to work on reducing the size of Pythran-generated binaries. Here is the outcome of my work.

Being more than a translator

Starting from a Cython blog post by Jake VanderPlas , a trip in compiler optimisation, with a special glance at modulo operation!

the Capsule Corporation

Python provides a convenient way to encapsulate a raw pointer in an object, to make interaction between native modules easier. SciPy uses that mechanism to call native code from some functions, and now Pythran can produce them just as well as Dr Brief would!

Pythran 0.8.3 is out!

Pythran version bump, new PyPI packages + Conda release, and a Changelog commented in a Jupyter notebook.

Toward a Simpler and Faster Pythran Compiler

6 months of tireless efforts to speedup pythran compilation time, and make the code easier to maintain.

from pythran import typing

Pythran recently gained a type checking ability, called tog . And given the size of the diff, that's not some minor improvement! Let's see what happened in terms of better robustness and error reporting :-)

Pythran Tutorial

Learn how to use Pythran, in a notebook or in a shell. Including some unusual Pythran tricks ;-)

Learn Pythran by practice

Show Pythran usage on multiple kernels with its strengths and its weaknesses

Pythran 0.7.5 is out!

Pythran version bump, new pypi packages and conda release!

Benchmarking Before the Release

Gathering several Cython vs. Numpy benchmarks on the WWW and piping them to Pythran to check that we don't have any performance regression before the release for PyData Paris .

Costless Abstraction with Pythran: Broadcasting

Broadcasting is a neat feature of Numpy array, but it was not trivial to implement at the C++ level, while keeping a high-level interface. after weeks of effort, here is a showcase of how good it runs, compared to the Numpy version and lower-level Cython and Numba version!

Identifier Binding Computation

Alias analysis is a poor term to describe the processing done by Pythran that is going to be described here. It could rather be named static computation of identifier binding , in the sense that it tries to give an over-approximation of which values an identifier can be bound to, at a given point of the program execution. Still, whatever its name, the process plays a key role in Pythran, so let's…

Micro-Benchmarking Julia, C++ and Pythran on an Economics kernel

Let's re-run an existing benchmark with Pythran

Compiler Flags

Playing with compiler forwarded by Pythran to GCC (or Clang) can yield surprising results, let's explore this!

Pythran Case: Resampling

Optimizing an algorithm found on Stack Overflow with Pythran, getting a x2 speedup with a single line, a x4 speedup with two lines and much more while switching our brain on!

Pythran 0.7.4 is out!

Pythran version bump, new pypi packages and conda release!