gh-132952: Import _io instead of io at startup#132957
gh-132952: Import _io instead of io at startup#132957JelleZijlstra merged 6 commits intopython:mainfrom
Conversation
|
Like #132956 this only helps |
|
I'm going to run this branch on our benchmarking hardware (as well as #132956), just so we have some numbers. |
|
This is actually more effective than (19%) than #132956 (12%). I think it makes sense to merge this, and maybe the other just for good measure (though it should have no additional effect). |
|
This is now ready. One tricky aspect is that we need to check any side effects that come from importing |
| @@ -0,0 +1,2 @@ | |||
| Speed up startup with the ``-S`` argument by about 19% by importing the | |||
There was a problem hiding this comment.
it is worth mentioning "vs what" when stating an improvement %.
There was a problem hiding this comment.
It's 19% vs. before this commit, but it's only 1.5% faster than 3.13.0 (which is probably what most users care about, since they don't run main). I would argue 1.5% is in the noise, so we probably shouldn't have a what's new entry at all -- this is just counteracting a regression in 3.14 development.
There was a problem hiding this comment.
It's only a NEWS entry, not text in the What's New, so I'll remove the 19% claim but leave the NEWS entry since this could affect behavior some users care about.
mdboom
left a comment
There was a problem hiding this comment.
LGTM, but I think we should remove the whatsnew.
|
When you're done making the requested changes, leave the comment: |
|
I have made the requested changes; please review again |
python_startup_no_sitebenchmark #132952