Skip to content

bpo-41718: Update runpy startup time What's New #24998

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Doc/whatsnew/3.10.rst
Original file line number Diff line number Diff line change
Expand Up @@ -922,9 +922,10 @@ Optimizations
(Contributed by Serhiy Storchaka in :issue:`41334`.)

* The :mod:`runpy` module now imports fewer modules.
The ``python3 -m module-name`` command startup time is 1.3x faster in
average.
(Contributed by Victor Stinner in :issue:`41006`.)
The ``python3 -m module-name`` command startup time is 1.4x faster in
average. On Linux, ``python3 -I -m module-name`` imports 69 modules on Python
3.9, whereas it only imports 51 modules (-18) on Python 3.10.
(Contributed by Victor Stinner in :issue:`41006` and :issue:`41718`.)

* The ``LOAD_ATTR`` instruction now uses new "per opcode cache" mechanism. It
is about 36% faster now for regular attributes and 44% faster for slots.
Expand Down