Posted on Hacker News there was an Implementation Plan for making CPython (the official Python implementation) faster. The author claims a 5x speedup is possible for the low cost of $2 million USD.
The four step plan includes
- creating an adaptive interpreter
- improvements to internal types
- creating a JIT compiler
- extending the JIT compiler
We have witnessed other attempts at making Python fast, each achieving their own degree of success in terms of performance and compatibility. For posterity I started keeping a list of them here, in no particular order.
Seq’s performance is usually comparable to that of C or C++, and can often be even better once domain-specific compiler optimizations are applied.
[Pyston] version 2 is 20% faster than stock Python 3.8 on our macrobenchmarks.
Pyston is a performance-oriented Python implementation built using LLVM and modern JIT techniques.
An optimization branch of CPython, intended to be fully compatible and significantly faster.
Stackless Python is an enhanced version of the Python programming language. It allows programmers to reap the benefits of thread-based programming without the performance and complexity problems associated with conventional threads.
A fast, compliant alternative implementation of Python.
Jython is approximately as fast as CPython–sometimes faster, sometimes slower. Because most JVMs–certainly the fastest ones–do long running, hot code will run faster over time.
The HotPy virtual machine is a high-performance virtual machine for Python.
Performance is comparable to CPython - much faster for some things … but slower for other things.
Psyco is a Python extension module which can greatly speed up the execution of any Python code.
Using the generated binary code gives a speed boost from 2 to 4.5 times.
Easily tune readable Python code into plain C performance by adding static type declarations.
Nuitka is more than 2 times faster than CPython …
Pyc is a python compiler intended for high performance computing and programming-in-the-large
For a set of 75 non-trivial programs …, measurements show a typical speedup of 2-200 times over CPython.
Numba makes Python code fast
Parakeet was a runtime accelerator for an array-oriented subset of Python.
Cannoli is a compiler for a subset of Python 3.6.5 and is designed to evaluate the language features of Python that negatively impact performance.