Skip to content

PERF: DataFrame.T #44724

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 2 commits into from
Dec 2, 2021
Merged

PERF: DataFrame.T #44724

merged 2 commits into from
Dec 2, 2021

Conversation

jbrockmendel
Copy link
Member

@jbrockmendel jbrockmendel commented Dec 2, 2021

  • closes #xxxx
  • tests added / passed
  • Ensure all linting tests pass, see here for how to run them
  • whatsnew entry

Perf regression caused by #44593 (not yet released, so no whatsnew)

from asv_bench.benchmarks.reshape import *
cls = ReshapeExtensionDtype
dtype = cls.params[0]
self = cls()
self.setup(dtype)

%timeit self.df.T
91.1 ms ± 1.75 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)  # <- master
163 µs ± 3.8 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)  # <- PR

@jreback jreback added this to the 1.4 milestone Dec 2, 2021
@jreback jreback added ExtensionArray Extending pandas with custom dtypes or arrays. Performance Memory or execution speed performance Reshaping Concat, Merge/Join, Stack/Unstack, Explode labels Dec 2, 2021
@jreback jreback merged commit e992969 into pandas-dev:master Dec 2, 2021
@jreback
Copy link
Contributor

jreback commented Dec 2, 2021

thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the perf-44595 branch December 2, 2021 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ExtensionArray Extending pandas with custom dtypes or arrays. Performance Memory or execution speed performance Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants