ideas
jnumpy
Our great sponsors
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
ideas
-
How Many Lines of C It Takes to Execute a and B in Python?
Recent CPython development has been towards optimizations and addressing use cases that benefit from optimizations, some coming from the faster CPython initiative. You might just get your JIT[1].
[1] https://github.com/faster-cpython/ideas/wiki/Workflow-for-3....
-
GIL removal and the Faster CPython project
The faster-cpython folks seem to be working towards a JIT (https://github.com/faster-cpython/ideas/tree/main/3.13) and both pyston and cinder have JITs. So I don't think anyone has ruled one out.
You should look into the copy & patch efforts underway for Python[0]; an actual JIT will probably never exist but I think c&p has a shot of being mainlined in the next few years, such that Python could dynamically choose to either run the interpreter or a c&p option.
-
Our Plan for Python 3.13
faster-cpython team has done a lot of work to experiment on it: https://github.com/faster-cpython/ideas/issues/485#issuecomm...
It kind of sounds like migration to register based is a foregone conclusion, but it's not very clear to me.
-
Faster CPython at PyCon, part two
lots of big ideas are still remaining to be done. One example is the register based interpreter, see https://github.com/faster-cpython/ideas/issues/485
A previous plan called for the beginning of a JIT in 3.12, seen as "Trace optimized interpreter" here: https://github.com/faster-cpython/ideas/wiki/Workflow-for-3....
-
I started a repo to gather a collection of scripts that leverage programing language quirks that cause unexpected behavior. It's just so much fun to see the wheels turning in someone's head when you show them a script like this. Please send in a PR if you feel like you have a great example!
Bignums are heap-allocated and not deduplicated, so they cease having the same identity. One day CPython might do the same, but previous attempts have always stalled.
-
Python 3.11 Delivers
Guido himself is involved in the faster-cpython project though (which is responsible for these performance improvements).
-
Codon: A high-performance Python compiler
I got a massive jump in performance when moving from Python 3.8 to 3.10 (over some function call optimizations I think, based on the project). And 3.11 got even better (up to 50% faster on special cases, and 10~15% on average) with respect to 3.10. Python 3.12 is already getting even more speedups and a there's a lot more down the road[0].
But Python core developers value keeping "not breaking anyones code" (Python 3 itself was a huge trip on that aspect and they're not making that mistake again), that's why things may seem slow on their end. But work is being done, and the results are there if you benchmark things.
[0] See https://github.com/faster-cpython/ideas/blob/main/FasterCPyt... however that's over a year old already and I'm sure I've read/heard more specifics
-
A Register-Based Python Interpreter for Beter Performance
For what it's worth, the CPython core/Faster CPython developers are actively investigating implementations of this idea: https://github.com/faster-cpython/ideas/issues/485 .
jnumpy
-
Making Python 100x faster with less than 100 lines of Rust
Julia 1.9 is fast. And you can use https://github.com/Suzhou-Tongyuan/jnumpy to write python extension in Julia now. So I think after 1.9 release julia would be much more usable.
-
This Week in Python
jnumpy – Writing Python C extensions in Julia within 5 minutes
- JNumPy: Writing high-performance C extensions for Python in minutes
What are some alternatives?
Nuitka - Nuitka is a Python compiler written in Python. It's fully compatible with Python 2.6, 2.7, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, and 3.11. You feed it your Python app, it does a lot of clever things, and spits out an executable or extension module.
faster-cpython - How to make CPython faster.
Pyjion - Pyjion - A JIT for Python based upon CoreCLR
makepackage - Package for easy packaging of Python code
poly-match - Source for the "Making Python 100x faster with less than 100 lines of Rust" blog post
PythonCall.jl - Python and Julia in harmony.
pyenv-virtualenv - a pyenv plugin to manage virtualenv (a.k.a. python-virtualenv)
nogil - Multithreaded Python without the GIL
log-booster - An VS code extension to quickly add frequently used log statements
cinder - Cinder is Meta's internal performance-oriented production version of CPython.
Schemathesis - Automate your API Testing: catch crashes, validate specs, and save time
hpy - HPy: a better API for Python