From fed278f4b88993a6d36ba2a6aeea197f29689a25 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Sat, 20 Mar 2021 19:15:25 +0000 Subject: [PATCH 1/3] bpo-43452: Document the PyType_Lookup optimizations in the What's New for 3.10 --- Doc/whatsnew/3.10.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index 51b3331be89e27..52600e9be8ce23 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -937,7 +937,6 @@ Optimizations for more details. (Contributed by Victor Stinner and Pablo Galindo in :issue:`38980`.) - * Function parameters and their annotations are no longer computed at runtime, but rather at compilation time. They are stored as a tuple of strings at the bytecode level. It is now around 2 times faster to create a function with @@ -949,6 +948,10 @@ Optimizations algorithm to avoid quadratic behavior on long strings. (Contributed by Dennis Sweeney in :issue:`41972`) +* Added micro-optimizations to ``_PyType_Lookup()`` to improve cache lookup + performance in the common case of cache hits. (Contributed by Dino Viehland + in :issue:`43452`) + Deprecated ========== From a0415dbe04f9f6c26dea3c62599432e254d8fb4f Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Mon, 22 Mar 2021 10:10:27 +0000 Subject: [PATCH 2/3] Update Doc/whatsnew/3.10.rst Co-authored-by: Victor Stinner --- Doc/whatsnew/3.10.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index 52600e9be8ce23..5b00dfe54b7499 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -948,7 +948,7 @@ Optimizations algorithm to avoid quadratic behavior on long strings. (Contributed by Dennis Sweeney in :issue:`41972`) -* Added micro-optimizations to ``_PyType_Lookup()`` to improve cache lookup +* Added micro-optimizations to ``_PyType_Lookup()`` to improve type attribute cache lookup performance in the common case of cache hits. (Contributed by Dino Viehland in :issue:`43452`) From 458b6b67df5aaa46dbc7bb2c94a9ccde7b3f9473 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Mon, 22 Mar 2021 21:20:15 +0000 Subject: [PATCH 3/3] Update Doc/whatsnew/3.10.rst --- Doc/whatsnew/3.10.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index 5b00dfe54b7499..bd36f72d498d19 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -949,8 +949,8 @@ Optimizations by Dennis Sweeney in :issue:`41972`) * Added micro-optimizations to ``_PyType_Lookup()`` to improve type attribute cache lookup - performance in the common case of cache hits. (Contributed by Dino Viehland - in :issue:`43452`) + performance in the common case of cache hits. This makes the interpreter 1.04 times faster + in average (Contributed by Dino Viehland in :issue:`43452`) Deprecated ==========