{"payload":{"allShortcutsEnabled":false,"path":"3.13","repo":{"id":343906231,"defaultBranch":"main","name":"ideas","ownerLogin":"faster-cpython","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2021-03-02T20:38:42.000Z","ownerAvatar":"https://web.archive.org/web/20240112073615/https://avatars.githubusercontent.com/u/81193161?v=4","public":true,"private":false,"isOrgOwned":true},"currentUser":null,"refInfo":{"name":"main","listCacheKey":"v0:1704319097.0","canEdit":false,"refType":"branch","currentOid":"7587e6ece8b2e295786ef997bd9ab72e3d72cc47"},"tree":{"items":[{"name":"README.md","path":"3.13/README.md","contentType":"file"},{"name":"engine.md","path":"3.13/engine.md","contentType":"file"}],"templateDirectorySuggestionUrl":null,"readme":{"displayName":"README.md","richText":"

Our plan for Python 3.13

\n

Author: Mark Shannon, Michael Droettboom

\n

Overview

\n

The plan for 3.13 is similar to early plans for 3.12.

\n

The big difference is that we have now finished the foundational work that we need:

\n\n

We plan three parallelizable pieces of work for 3.13:

\n\n

The tier 2 optimizer

\n

See Tier 2 optimizer for an explanation of what the tier2 optimizer is.

\n

The workplan is roughly as follows:

\n\n

Our goal for 3.13 is to reduce the time spent in the interpreter by at least 50%.

\n

Issue.\nExecution engine.\nDetailed plan for copy-and-patch.

\n

Enabling subinterpreters from Python

\n

Unlike the other tasks, which are mainly focused on single-threaded performance, this work builds on the per-interpreter GIL work that shipped in Python 3.12 to allow Python programmers to take advantage of better parallelism in subinterpreters from Python code (without the need to write a C extension).

\n

A draft PEP 554 already exists for this work. The first step will be to get it updated and push for an early approval, so we can change course if necessary.

\n

Detailed plan.

\n

Better memory management

\n

The profiling data shows that quite a large amount of time spent is spent in memory management and cycle GC. That fraction will only get larger as we speed up the rest of the VM.

\n

Unlike the tasks above, we are less certain about the appropriate solutions, so some more research and experimentation is required first.\nWe plan to do this as a side project based on what we learn from the Tier 2 work above.

\n

We want to:

\n\n

TODO: Create issues for investigation

\n

List our detailed strategy and workplan for improving allocation/deallocation speed and reducing cycle GC overhead.

\n
\n

* We also hope that partial evaluation will reduce the number of temporary objects, but that is in the scope of the tier 2 optimizer, not memory management.

\n
","errorMessage":null,"headerInfo":{"toc":[{"level":1,"text":"Our plan for Python 3.13","anchor":"our-plan-for-python-313","htmlText":"Our plan for Python 3.13"},{"level":3,"text":"Overview","anchor":"overview","htmlText":"Overview"},{"level":3,"text":"The tier 2 optimizer","anchor":"the-tier-2-optimizer","htmlText":"The tier 2 optimizer"},{"level":3,"text":"Enabling subinterpreters from Python","anchor":"enabling-subinterpreters-from-python","htmlText":"Enabling subinterpreters from Python"},{"level":3,"text":"Better memory management","anchor":"better-memory-management","htmlText":"Better memory management"}],"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Ffaster-cpython%2Fideas%2Ftree%2Fmain%2F3.13"}},"totalCount":2,"showBranchInfobar":false},"fileTree":{"":{"items":[{"name":"3.12","path":"3.12","contentType":"directory"},{"name":"3.13","path":"3.13","contentType":"directory"},{"name":"flamegraphs","path":"flamegraphs","contentType":"directory"},{"name":"results","path":"results","contentType":"directory"},{"name":"stats","path":"stats","contentType":"directory"},{"name":"FasterCPythonDark.pdf","path":"FasterCPythonDark.pdf","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"windows_benchmarks.md","path":"windows_benchmarks.md","contentType":"file"}],"totalCount":8}},"fileTreeProcessingTime":1.894607,"foldersToFetch":[],"treeExpanded":true,"symbolsExpanded":false,"csrf_tokens":{"/faster-cpython/ideas/branches":{"post":"YmGA5GVvn3kH3mI-Ie1EhP5qHv-vCkroXk44UYPed8s_WslGnHQkyTtVvl03H9joWTz8NysqIVBbTpEz7lWWog"},"/faster-cpython/ideas/branches/fetch_and_merge/main":{"post":"qR75brKS8TI8HjrmqeK7tzrcThDRr8il1fm60akl5i39c4PW20SYTSq4cyzdpAZZes2iaiUJPodzQaeNZNkiaA"},"/faster-cpython/ideas/branches/fetch_and_merge/main?discard_changes=true":{"post":"HDGnPjQv216xN5RJIvhzwXqrQyInqwxOC5MQ0DJoMwhIXN2GXfmyIaeR3YNWvs4vOrqvWNMN-mytKw2M_5T3TQ"}}},"title":"ideas/3.13 at main ยท faster-cpython/ideas"}