Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.2k
Improve performance of_typing_extra
module#11255
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
cloudflare-workers-and-pagesbot commentedJan 10, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Deploying pydantic-docs with |
Latest commit: | 6f56712 |
Status: | ✅ Deploy successful! |
Preview URL: | https://e27b80b8.pydantic-docs.pages.dev |
Branch Preview URL: | https://typing-extra-perf.pydantic-docs.pages.dev |
codspeed-hqbot commentedJan 10, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
CodSpeed Performance ReportMerging#11255 willnot alter performanceComparing Summary
|
Uh oh!
There was an error while loading.Please reload this page.
github-actionsbot commentedJan 10, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Coverage reportClick to see where and how coverage changed
This report was generated bypython-coverage-comment-action |
Uh oh!
There was an error while loading.Please reload this page.
pydantic/_internal/_typing_extra.py Outdated
@@ -58,7 +40,7 @@ def is_any(tp: Any, /) -> bool: | |||
#> True | |||
``` | |||
""" | |||
return_is_typing_name(tp, name='Any') | |||
returntp is typing.Any or tp is t_e.Any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I wonder if it's worth importing everything by name and avoiding the attribute access, in my test it reduced the time from about 30ns to 20ns?
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Looking great otherwise!
Uh oh!
There was an error while loading.Please reload this page.
8ef33a0
intomainUh oh!
There was an error while loading.Please reload this page.
Change Summary
Related issue number
Checklist