Skip to content

PERF: tolist #43823

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
Sep 30, 2021
Merged

PERF: tolist #43823

merged 1 commit into from
Sep 30, 2021

Conversation

jbrockmendel
Copy link
Member

The parent class implementation is faster.

dti = pd.date_range("2016-01-01", periods=10**5, freq="S")

%timeit dti.tolist()
286 ms ± 3 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)  # <- master
62.8 ms ± 765 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)  # <- PR

@jreback jreback added the Performance Memory or execution speed performance label Sep 30, 2021
@jreback jreback added this to the 1.4 milestone Sep 30, 2021
@jreback
Copy link
Contributor

jreback commented Sep 30, 2021

wow

@jreback jreback merged commit 497c19a into pandas-dev:master Sep 30, 2021
@jbrockmendel jbrockmendel deleted the perf-tolist branch September 30, 2021 23:01
gasparitiago pushed a commit to gasparitiago/pandas that referenced this pull request Oct 9, 2021
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants