8000 Update what's new for new --enable-experimental-jit options · python/cpython@c5d8c0a · GitHub
[go: up one dir, main page]

Skip to content

Commit c5d8c0a

Browse files
committed
Update what's new for new --enable-experimental-jit options
1 parent 391bd46 commit c5d8c0a

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

Doc/whatsnew/3.13.rst

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ Experimental JIT Compiler
888888
=========================
889889

890890
When CPython is configured using the ``--enable-experimental-jit`` option,
891-
a just-in-time compiler is added which can speed up some Python programs.
891+
a just-in-time compiler is added which may speed up some Python programs.
892892

893893
The internal architecture is roughly as follows.
894894

@@ -905,18 +905,35 @@ The internal architecture is roughly as follows.
905905
before it is interpreted or translated to machine code.
906906

907907
* There is a Tier 2 interpreter, but it is mostly intended for debugging
908-
the earlier stages of the optimization pipeline. If the JIT is not
909-
enabled, the Tier 2 interpreter can be enabled by configuring Python
910-
with the ``--enable-experimental-tier2`` option.
908+
the earlier stages of the optimization pipeline.
909+
The Tier 2 interpreter can be enabled by configuring Python
910+
with ``--enable-experimental-jit=interpreter``.
911911

912-
* When the ``--enable-experimental-jit`` option is used, the optimized
912+
* When the JIT is enabled, the optimized
913913
Tier 2 IR is translated to machine code, which is then executed.
914-
This does not require additional runtime options.
915914

916915
* The machine code translation process uses an architecture called
917916
*copy-and-patch*. It has no runtime dependencies, but there is a new
918917
build-time dependency on LLVM.
919918

919+
The ``--enable-experimental-jit`` flag has the following optional values:
920+
921+
* ``no`` (default) -- Disable the entire Tier 2 and JIT pipeline.
922+
923+
* ``yes`` (default if the flag is present without optional value)
924+
-- Enable the JIT. To disable the JIT at runtime,
925+
pass the environment variable ``PYTHON_JIT=0``.
926+
927+
* ``yes-default-off`` -- Build the JIT but disable it by default.
928+
To emable the JIT at runtime, pass the environment variable
929+
``PYTHON_JIT=1``.
930+
931+
* ``interpreter`` -- Enable the Tier 2 interpreter but disable the JIT.
932+
The interpreter can be disabled by running with
933+
``PYTHON_JIT=0``.
934+
935+
(On Windows, use ``PCbuild/build.bat --enable-jit`` to enable the JIT.)
936+
920937
See :pep:`744` for more details.
921938

922939
(JIT by Brandt Bucher, inspired by a paper by Haoran Xu and Fredrik Kjolstad.

0 commit comments

Comments
 (0)
0