From daf18c52b8392c762fc2e003e74ec182d021c8cc Mon Sep 17 00:00:00 2001 From: Cody Maloney Date: Tue, 5 Nov 2024 17:14:58 -0800 Subject: [PATCH] gh-120754: Add to `io` optimization to What's new --- Doc/whatsnew/3.14.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index 9300de440cdc30..b9d2c27eb9a321 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -471,6 +471,15 @@ asyncio reduces memory usage. (Contributed by Kumar Aditya in :gh:`107803`.) +io +--- +* :mod:`io` which provides the built-in :func:`open` makes less system calls + when opening regular files as well as reading whole files. Reading a small + operating system cached file in full is up to 15% faster. + :func:`pathlib.Path.read_bytes` has the most optimizations for reading a + file's bytes in full. (Contributed by Cody Maloney and Victor Stinner in + :gh:`120754` and :gh:`90102`.) + Deprecated ==========