gh-91345: Talk about ``sys._getframe`` compatibility in 3.11 whatsnew (GH-92552)

This commit is contained in:
Ken Jin 2022-05-09 21:45:13 +08:00 committed by GitHub
parent 11a608d2b1
commit be3cdd66c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -891,10 +891,11 @@ holds execution information. The following are new frame optimizations:
- Streamlined the internal frame struct to contain only essential information. - Streamlined the internal frame struct to contain only essential information.
Frames previously held extra debugging and memory management information. Frames previously held extra debugging and memory management information.
Old-style frame objects are now created only when required by debuggers. For Old-style frame objects are now created only when requested by debuggers or
most user code, no frame objects are created at all. As a result, nearly all by Python introspection functions such as ``sys._getframe`` or
Python functions calls have sped up significantly. We measured a 3-7% speedup ``inspect.currentframe``. For most user code, no frame objects are
in pyperformance. created at all. As a result, nearly all Python functions calls have sped
up significantly. We measured a 3-7% speedup in pyperformance.
(Contributed by Mark Shannon in :issue:`44590`.) (Contributed by Mark Shannon in :issue:`44590`.)