Skip to content

Commit e4a6024

Browse files
pythongh-128563: Add correction note to tail call in whats new (python#130908)
* Add correction note to tail call in whats new * Update 3.14.rst
1 parent 293fa34 commit e4a6024

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

Doc/whatsnew/3.14.rst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ It uses tail calls between small C functions that implement individual
270270
Python opcodes, rather than one large C case statement.
271271
For certain newer compilers, this interpreter provides
272272
significantly better performance. Preliminary numbers on our machines suggest
273-
anywhere from -3% to 30% faster Python code, and a geometric mean of 9-15%
273+
anywhere up to 30% faster Python code, and a geometric mean of 3-5%
274274
faster on ``pyperformance`` depending on platform and architecture. The
275275
baseline is Python 3.14 built with Clang 19 without this new interpreter.
276276

@@ -295,6 +295,19 @@ For further information on how to build Python, see
295295

296296
__ https://en.wikipedia.org/wiki/Tail_call
297297

298+
.. attention::
299+
300+
This section previously reported a 9-15% geomean speedup. This number has since been
301+
cautiously revised down to 3-5%. While we expect performance results to be better
302+
than what we report, our estimates are more conservative due to a
303+
`compiler bug <https://github.com/llvm/llvm-project/issues/106846>`_ found in
304+
Clang/LLVM 19. We were unaware of this bug, and it artifically boosted
305+
our numbers, resulting in inaccurate results. We sincerely apologize for
306+
communicating results that were only accurate for certain versions of LLVM 19
307+
and 20. At the time of writing, this bug has not yet been fixed in LLVM 19-21. Thus
308+
any benchmarks with those versions of LLVM may produce artifically inflated numbers.
309+
(Thanks to Nelson Elhage for bringing this to light.)
310+
298311
(Contributed by Ken Jin in :gh:`128563`, with ideas on how to implement this
299312
in CPython by Mark Shannon, Garrett Gu, Haoran Xu, and Josh Haberman.)
300313

0 commit comments

Comments
 (0)