Skip to content

PERF: TimedeltaArray.astype(object) #45571

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
Jan 23, 2022

Conversation

jbrockmendel
Copy link
Member

In [2]: tdi = pd.timedelta_range("1 second", periods=10**5, freq="s")

In [5]: %timeit tdi.astype(object)
388 ms ± 43.5 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)   # <- PR
588 ms ± 63.4 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)   # <- main

@jreback jreback added Performance Memory or execution speed performance Timedelta Timedelta data type labels Jan 23, 2022
@jreback jreback added this to the 1.5 milestone Jan 23, 2022
@jreback
Copy link
Contributor

jreback commented Jan 23, 2022

worth a note in a followup

@jreback jreback merged commit 4f712c1 into pandas-dev:main Jan 23, 2022
@jbrockmendel jbrockmendel deleted the perf-pytimedelta branch January 23, 2022 20:53
yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance Memory or execution speed performance Timedelta Timedelta data type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants