Skip to content

PERF: resolution, is_normalized #56637

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

Merged
merged 1 commit into from
Dec 27, 2023

Conversation

jbrockmendel
Copy link
Member

dti = pd.date_range("2016-01-01", periods=10_000)
dta = dti._data

In [4]: %timeit dta.is_normalized
354 µs ± 3.62 µs per loop (mean ± std. dev. of 7 runs, 1,000 loops each)   # <- main
122 µs ± 2.71 µs per loop (mean ± std. dev. of 7 runs, 10,000 loops each)  # <- PR

In [5]: %timeit dta.resolution
493 µs ± 4.86 µs per loop (mean ± std. dev. of 7 runs, 1,000 loops each)  # <- main
258 µs ± 10.3 µs per loop (mean ± std. dev. of 7 runs, 1,000 loops each)  # <- PR

@mroeschke mroeschke added Datetime Datetime data dtype Performance Memory or execution speed performance labels Dec 27, 2023
@mroeschke mroeschke added this to the 3.0 milestone Dec 27, 2023
@mroeschke mroeschke merged commit 0643a18 into pandas-dev:main Dec 27, 2023
@mroeschke
Copy link
Member

Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the perf-resolution branch December 27, 2023 23:43
cbpygit pushed a commit to cbpygit/pandas that referenced this pull request Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype Performance Memory or execution speed performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants