File tree Expand file tree Collapse file tree
Misc/NEWS.d/next/Core_and_Builtins Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1361,6 +1361,12 @@ zlib
13611361 Optimizations
13621362=============
13631363
1364+ * :func: `repr ` and :func: `str ` of :class: `float ` and :class: `complex ` values
1365+ are now several times faster, using the Ryū algorithm for shortest
1366+ float-to-string conversion in place of arbitrary-precision arithmetic.
1367+ The output is unchanged.
1368+ (Contributed by Gregory P. Smith in :gh: `00000 `.)
1369+
13641370* ``mimalloc `` is now used as the default allocator for
13651371 for raw memory allocations such as via :c:func: `PyMem_RawMalloc `
13661372 for better performance on :term: `free-threaded builds <free-threaded build> `.
Original file line number Diff line number Diff line change 1+ :func: `repr ` and :func: `str ` of :class: `float ` and :class: `complex ` values
2+ are now several times faster. The shortest-representation conversion now
3+ uses the Ryū algorithm with a fixed-size lookup table instead of the
4+ arbitrary-precision arithmetic in David Gay's ``dtoa ``. The output is
5+ unchanged.
You can’t perform that action at this time.
0 commit comments