PERF: Use is_utc check to improve performance of dateutil UTC in DatetimeIndex methods by mroeschke · Pull Request #23772 · pandas-dev/pandas (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation5 Commits9 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
- passes
git diff upstream/master -u -- "*.py" | flake8 --diff
- whatsnew entry
Benchmarks from timeseries.py
and timestamp.py
before after ratio
[91d1c503] [9cc84951]
- 32.6±0.7μs 6.89±0.2μs 0.21 timestamp.TimestampOps.time_normalize(tzutc())
SOME BENCHMARKS HAVE CHANGED SIGNIFICANTLY.
before after ratio
[91d1c503] [9cc84951]
- 4.72±0.1μs 4.26±0.06μs 0.90 timeseries.DatetimeIndex.time_get('dst')
- 5.09±0.4ms 2.79±0.02ms 0.55 timeseries.DatetimeAccessor.time_dt_accessor_normalize(tzutc())
- 297±20μs 42.9±0.2μs 0.14 timeseries.TzLocalize.time_infer_dst(tzutc())
SOME BENCHMARKS HAVE CHANGED SIGNIFICANTLY.
Matt Roeschke added 8 commits
lgtm. I bet this actually fixed a bug where a dateutil UTC value was not treated correctly?
Also datetime.timezones.utc in py3
thanks @mroeschke
as above, if you find some issues that now are closable because of the better checking (mine and @jbrockmendel comments). pls issue a PR with tests.
thoo added a commit to thoo/pandas that referenced this pull request
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request