3

Workflow for 3.12 cycle · faster-cpython/ideas Wiki · GitHub

 2 years ago
source link: https://github.com/faster-cpython/ideas/wiki/Workflow-for-3.12-cycle
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

(Graphical version at the end)

Multi-core Python

A per-interpreter GIL

  • Per-interpreter isolation for extension modules

  • A CI check to prevent new globals in CPython code

    • Tooling to identify global variables in CPython code
  • Interpreter isolation (_PyRuntimeState -> PyInterpreterState)

    • Consolidate global state to _PyRuntimeState

      • Tooling to identify global variables in CPython code (also above)
    • PEP 683 - immortal objects

    • mimalloc

  • Restrictions on interpreter capability (e.g. no threading)

    • Per-interpreter config & func to specify restrictions
  • PEP 684: A Per-interpreter GIL

Expose multiple interpreters to Python code

  • Implement PEP 554

    • PEP 554 - Multiple Interpreters in the Stdlib

Reduced Reference Count Overhead

Reduced reference counting overhead

  • Optimize flow of references in C, transferring ownership when needed

    • Identify flow of references in C
  • Static reduction in refcount operations

    • Bytecode compiler enhancements Irit

    • Deferred reference counts

  • Deferred reference counts (also above)

Improve cycle GC

  • (Task needs breaking up)

Compact Objects

Compact objects

  • Merge managed dict and values pointer into one word

  • One word GC header

    • Saturating refcounts

Specialization

Finish specialization

  • Specialize SEND

    • Specialize FOR_ITER for generator

      • Specialize FOR_ITER for sequences Dennis

      • Shim frames on entry to PyEval_EvalDefault

        • Identify main sources of calls to PyEval_EvalFrame
    • Move PEP 380 logic into compiler Brandt

Trace optimized interpreter

Projected (short) trace opimized interpreter

  • Optimize traces: Guard stengthening and elimination

    • Trace interpreter (also below)
  • Optimize traces: Allocation elimination

    • Trace interpreter

      • Breakup instruction definitions into 'mini-ops' (see below)

      • Trace projection: Create traces from hotspots

        • Detect hotspots in code

          • Only unconditional jumps should go backwards
        • Implement optimizer API

        • Generate version of the interpreter better suited to emscripten and web assembly

        • Breakup instruction definitions into 'mini-ops'

          • Move opcode definitions to their own file and generate PyEval_EvalDefault (also below)

            • Move PEP 380 logic into compiler Brandt (also above)
          • Encapasulate GIL code and move it out of ceval.c #93177

  • Generate version of the interpreter better suited to emscripten and web assembly (goal without dependents?)

    • Move opcode definitions to their own file and generate PyEval_EvalDefault (also above)

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK