-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
use sets #3546
use sets #3546
Conversation
willmcgugan
commented
Oct 31, 2024
•
edited
Loading
edited
- Faster detection of single length widths
- Faster sum by using map rather than a list expression
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #3546 +/- ##
==========================================
- Coverage 98.27% 98.25% -0.02%
==========================================
Files 74 74
Lines 8096 8095 -1
==========================================
- Hits 7956 7954 -2
- Misses 140 141 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I would recommend lazily defining constants like that so import time is not affected, especially since that is critical for command line applications. See PEP 562 https://peps.python.org/pep-0562/ |
Agree in principle, but this data is used by virtually anything Rich does. So it is always needed. It also turns out that it is faster to compute this than import it. 0.11ms to compute version 0.39ms to import. So on my Macbook at least, it is a win to compute it. |
Definitely makes sense if it's used everywhere, thanks! I'm just always looking for ways to reduce the import time of Rich, currently I think it could be better but I haven't had much time to look into that. |