diff options
author | Alex Waygood <Alex.Waygood@Gmail.com> | 2023-05-07 17:45:09 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-07 17:45:09 (GMT) |
commit | 1b19bd1a88e6c410fc9cd08db48e0d35cfa8bb5a (patch) | |
tree | 3b858db3317ce265f4830ec9556988874acfdb5c /Doc/whatsnew | |
parent | 60f588478f0a3d88e86b97acecbcb569142f4636 (diff) | |
download | cpython-1b19bd1a88e6c410fc9cd08db48e0d35cfa8bb5a.zip cpython-1b19bd1a88e6c410fc9cd08db48e0d35cfa8bb5a.tar.gz cpython-1b19bd1a88e6c410fc9cd08db48e0d35cfa8bb5a.tar.bz2 |
gh-103193: cache calls to `inspect._shadowed_dict` in `inspect.getattr_static` (#104267)
Co-authored-by: Carl Meyer <carl@oddbird.net>
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/3.12.rst | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst index ec04178..65b3e9f 100644 --- a/Doc/whatsnew/3.12.rst +++ b/Doc/whatsnew/3.12.rst @@ -342,8 +342,9 @@ inspect (Contributed by Thomas Krennwallner in :issue:`35759`.) * The performance of :func:`inspect.getattr_static` has been considerably - improved. Most calls to the function should be around 2x faster than they - were in Python 3.11. (Contributed by Alex Waygood in :gh:`103193`.) + improved. Most calls to the function should be at least 2x faster than they + were in Python 3.11, and some may be 6x faster or more. (Contributed by Alex + Waygood in :gh:`103193`.) pathlib ------- @@ -597,7 +598,7 @@ typing :func:`runtime-checkable protocols <typing.runtime_checkable>` has changed significantly. Most ``isinstance()`` checks against protocols with only a few members should be at least 2x faster than in 3.11, and some may be 20x - faster or more. However, ``isinstance()`` checks against protocols with seven + faster or more. However, ``isinstance()`` checks against protocols with fourteen or more members may be slower than in Python 3.11. (Contributed by Alex Waygood in :gh:`74690` and :gh:`103193`.) |