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 }})

mroeschke

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

November 17, 2018 19:25

@pep8speaks

@jreback

lgtm. I bet this actually fixed a bug where a dateutil UTC value was not treated correctly?

@jbrockmendel

Also datetime.timezones.utc in py3

@codecov

@jreback

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

Nov 19, 2018

@thoo

Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request

Feb 28, 2019

@mroeschke @Pingviinituutti

Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request

Feb 28, 2019

@mroeschke @Pingviinituutti