-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
PERF: consolidate imports inside parse_time_string #24084
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
Conversation
Hello @qwhelan! Thanks for submitting the PR.
|
Codecov Report
@@ Coverage Diff @@
## master #24084 +/- ##
=======================================
Coverage 42.51% 42.51%
=======================================
Files 161 161
Lines 51689 51689
=======================================
Hits 21974 21974
Misses 29715 29715
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #24084 +/- ##
=======================================
Coverage 92.21% 92.21%
=======================================
Files 161 161
Lines 51684 51684
=======================================
Hits 47658 47658
Misses 4026 4026
Continue to review full report at Codecov.
|
can you rebase on master; I think there might be an error in the benchmark (or if not the script should complete green, the CI has been fixed). |
0f215ad
to
4d9040f
Compare
can you remove the |
4d9040f
to
0868c38
Compare
0868c38
to
3e9370d
Compare
@jreback I believe the warnings in frame_methods were handled in another PR, so I've rebased again off master. |
thanks @qwhelan |
This PR adds an asv benchmark for the creation of
Period
objects directly from integers, and an associated speedup for the same case.When calling
Period._from_ordinal()
, the runtime is unfortunately dominated by a pair of import statements needed to pull in the global config settingsdisplay.date_dayfirst
anddisplay.date_yearfirst
. Thus, simply consolidating them leads to a significant speedup:git diff upstream/master -u -- "*.py" | flake8 --diff