faster-cpython / ideas

1.69k stars 48 forks source link

Communication about faster-cpython after 3.13 release? #701

Open paugier opened 3 days ago

paugier commented 3 days ago

I'm teaching Python for sciences and try to understand what happens with the different projects to improve Python performance.

I tried to follow faster-cpython but I have to admit that I feel a bit lost with the current state.

I read https://docs.python.org/3.13/whatsnew/3.13.html#an-experimental-just-in-time-jit-compiler, which seems quite clear.

However, I also see that 3.13, even with Tier 2 and JIT enabled (and free-threaded mode disabled), is only marginally faster than 3.12 (https://github.com/faster-cpython/benchmarking-public), and clearly still much slower than PyPy.

I think it would be useful to have few communications (at different technical levels) to explain where is the project and what are the next steps for 3.14 and 3.15. Also about the consequences of the GIL removal for faster-cpython.

Fidget-Spinner commented 1 day ago

FTR, what I say here is not representative of the team. It's just my personal opinion.

Mike is working on a 3.14 plan document that you should look out for soon. In my view, there's a few things going on:

IMO, we (ie the core developers, faster CPython team, and other contributors) laid the foundations in 3.13 for the JIT and free-threading. The 3.13 JIT speeds up non-generator workloads right now, and slows down generator stuff. So that explains why it has no overall speedups right now. (To see what I mean, you can look at the breakdown of each benchmark by clicking around the link you provided).

At a very high level in 3.14:

More technical details in 3.14:

Hope this answer helps. If you have any more questions do let us know.