]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-94841: Ensure arena_map_get() is inlined in PyObject_Free() (#94842)
authorneonene <53406459+neonene@users.noreply.github.com>
Thu, 14 Jul 2022 18:33:25 +0000 (03:33 +0900)
committerGitHub <noreply@github.com>
Thu, 14 Jul 2022 18:33:25 +0000 (11:33 -0700)
Misc/NEWS.d/next/Build/2022-07-14-02-45-44.gh-issue-94841.lLRTdf.rst [new file with mode: 0644]
Objects/obmalloc.c

diff --git a/Misc/NEWS.d/next/Build/2022-07-14-02-45-44.gh-issue-94841.lLRTdf.rst b/Misc/NEWS.d/next/Build/2022-07-14-02-45-44.gh-issue-94841.lLRTdf.rst
new file mode 100644 (file)
index 0000000..f7ad4f8
--- /dev/null
@@ -0,0 +1 @@
+Fix the possible performance regression of :c:func:`PyObject_Free` compiled with MSVC version 1932.
index 78a6f01a0964ed08db3a69a4b49aded15eb10593..1d487d8e807a22ad46a00a85ff0e30ef05483094 100644 (file)
@@ -1446,7 +1446,7 @@ static arena_map_bot_t arena_map_root;
 
 /* Return a pointer to a bottom tree node, return NULL if it doesn't exist or
  * it cannot be created */
-static arena_map_bot_t *
+static Py_ALWAYS_INLINE arena_map_bot_t *
 arena_map_get(block *p, int create)
 {
 #ifdef USE_INTERIOR_NODES