Skip to content

Comments

perf: tiny import time improvement and simplification#1047

Merged
henryiii merged 1 commit intopypa:mainfrom
henryiii:henryiii/perf/importtime
Jan 12, 2026
Merged

perf: tiny import time improvement and simplification#1047
henryiii merged 1 commit intopypa:mainfrom
henryiii:henryiii/perf/importtime

Conversation

@henryiii
Copy link
Contributor

Followup to #1030, using @notatallshaw's suggestion, which I though would look more complicated until I saw @hugovk's version in python/cpython#143660. Should be slightly faster import time, and reads slightly better, IMO.

Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
@notatallshaw
Copy link
Member

Yeah, this version is impressively simple, I hadn't thought of it.

@henryiii henryiii merged commit 7ae56cf into pypa:main Jan 12, 2026
40 checks passed
@henryiii henryiii deleted the henryiii/perf/importtime branch January 12, 2026 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants