From 2b11fd2dbe89fefc7e9e37a1544aa1458e7faffc Mon Sep 17 00:00:00 2001 From: Donghee Na Date: Sat, 15 Mar 2025 23:03:21 +0900 Subject: [PATCH 1/4] gh-11599: Update whats news for free-threaded 3.14 --- Doc/whatsnew/3.14.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index b1337190636529..aa5b33513c63e6 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -68,6 +68,7 @@ Summary -- release highlights * :ref:`PEP 741: Python Configuration C API ` * :ref:`PEP 761: Discontinuation of PGP signatures ` * :ref:`A new type of interpreter ` +* :ref:`Free-threaded CPython ` Incompatible changes @@ -311,6 +312,24 @@ For further information on how to build Python, see (Contributed by Ken Jin in :gh:`128563`, with ideas on how to implement this in CPython by Mark Shannon, Garrett Gu, Haoran Xu, and Josh Haberman.) +.. _whatsnew314-free-threaded-cpython: + +Free-threaded CPython +--------------------- + +Free-threaded CPython now supports :pep:`659` which is known +as the specializing adaptive interpreter, the execution mechanisms is almost same +as the default build, but at free-threaded CPython build, each thread maintains +a thread-local copy of specialized bytecode. + +With this change, the free-threaded CPython build achieve better performance +and 10-15% slower than the default build. + +This work was done by many contributors, Matt Page, Neil Schemenauer, +Sam Gross, Thomas Wouters, Donghee Na and Kirill Podoprigora +Meta also provided significant engineering resources for performance benchmark and +design per thread specialized bytecode mechanisms. + Other language changes ====================== From 4b87b5bcb283894ff492a929610cb5115b3e883d Mon Sep 17 00:00:00 2001 From: Donghee Na Date: Sat, 15 Mar 2025 23:04:38 +0900 Subject: [PATCH 2/4] Add Ken Jin because he involves early design --- Doc/whatsnew/3.14.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index aa5b33513c63e6..5f7b991210bb9a 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -326,7 +326,7 @@ With this change, the free-threaded CPython build achieve better performance and 10-15% slower than the default build. This work was done by many contributors, Matt Page, Neil Schemenauer, -Sam Gross, Thomas Wouters, Donghee Na and Kirill Podoprigora +Sam Gross, Thomas Wouters, Donghee Na, Kirill Podoprigora and Ken Jin. Meta also provided significant engineering resources for performance benchmark and design per thread specialized bytecode mechanisms. From e384e7a403782296ef0c4bb9134959e911c732dd Mon Sep 17 00:00:00 2001 From: Donghee Na Date: Sun, 16 Mar 2025 10:37:50 +0900 Subject: [PATCH 3/4] Apply suggestions from code review Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> --- Doc/whatsnew/3.14.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index 5f7b991210bb9a..2c07ed93ab8b07 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -318,17 +318,17 @@ Free-threaded CPython --------------------- Free-threaded CPython now supports :pep:`659` which is known -as the specializing adaptive interpreter, the execution mechanisms is almost same +as the specializing adaptive interpreter. The execution mechanism is almost same as the default build, but at free-threaded CPython build, each thread maintains a thread-local copy of specialized bytecode. -With this change, the free-threaded CPython build achieve better performance -and 10-15% slower than the default build. +With this change, the free-threaded CPython build achieves better performance, +and is only 10-15% slower than the default build. This work was done by many contributors, Matt Page, Neil Schemenauer, Sam Gross, Thomas Wouters, Donghee Na, Kirill Podoprigora and Ken Jin. -Meta also provided significant engineering resources for performance benchmark and -design per thread specialized bytecode mechanisms. +Meta also provided significant engineering resources for performance benchmarking and +design of per thread specialized bytecode mechanisms. Other language changes From 1b0d395bda53d0edffcd00f46c4d23cc5730e9d4 Mon Sep 17 00:00:00 2001 From: Donghee Na Date: Sun, 16 Mar 2025 10:38:45 +0900 Subject: [PATCH 4/4] Update Doc/whatsnew/3.14.rst Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> --- Doc/whatsnew/3.14.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index 2c07ed93ab8b07..95db060c3d43c1 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -319,8 +319,8 @@ Free-threaded CPython Free-threaded CPython now supports :pep:`659` which is known as the specializing adaptive interpreter. The execution mechanism is almost same -as the default build, but at free-threaded CPython build, each thread maintains -a thread-local copy of specialized bytecode. +as the default build, however in a free-threaded CPython build, each thread +maintains a thread-local copy of specialized bytecode. With this change, the free-threaded CPython build achieves better performance, and is only 10-15% slower than the default build.