]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-128563: Add correction note to tail call in whats new (#130908)
authorKen Jin <kenjin@python.org>
Thu, 6 Mar 2025 06:43:53 +0000 (14:43 +0800)
committerGitHub <noreply@github.com>
Thu, 6 Mar 2025 06:43:53 +0000 (14:43 +0800)
* Add correction note to tail call in whats new

* Update 3.14.rst

Doc/whatsnew/3.14.rst

index 7c1245187f603d81f6efd1264ba596205e15b5c1..a178ba51c89c4866cbde1237318fbaba2ccf6a5b 100644 (file)
@@ -270,7 +270,7 @@ It uses tail calls between small C functions that implement individual
 Python opcodes, rather than one large C case statement.
 For certain newer compilers, this interpreter provides
 significantly better performance. Preliminary numbers on our machines suggest
-anywhere from -3% to 30% faster Python code, and a geometric mean of 9-15%
+anywhere up to 30% faster Python code, and a geometric mean of 3-5%
 faster on ``pyperformance`` depending on platform and architecture. The
 baseline is Python 3.14 built with Clang 19 without this new interpreter.
 
@@ -295,6 +295,19 @@ For further information on how to build Python, see
 
    __ https://en.wikipedia.org/wiki/Tail_call
 
+.. attention::
+
+    This section previously reported a 9-15% geomean speedup. This number has since been
+    cautiously revised down to 3-5%. While we expect performance results to be better
+    than what we report, our estimates are more conservative due to a
+    `compiler bug <https://github.com/llvm/llvm-project/issues/106846>`_ found in
+    Clang/LLVM 19. We were unaware of this bug, and it artifically boosted
+    our numbers, resulting in inaccurate results. We sincerely apologize for
+    communicating results that were only accurate for certain versions of LLVM 19
+    and 20. At the time of writing, this bug has not yet been fixed in LLVM 19-21. Thus
+    any benchmarks with those versions of LLVM may produce artifically inflated numbers.
+    (Thanks to Nelson Elhage for bringing this to light.)
+
 (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.)