Skip to content

PERF: rebuild_blknos_and_blklocs #43353

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

Conversation

jbrockmendel
Copy link
Member

I don't have an asv on hand which is dominated by this method, but profiling time_copy_overhead_single_col and looking at this method:

from asv_bench.benchmarks.groupby import *
self = Apply()
self.setup(4)

%timeit self.time_copy_overhead_single_col(4)
227 ms ± 10.9 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)  # <- master
218 ms ± 13.3 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)  # <- PR

%prun -s cumtime for n in range(10): self.time_copy_overhead_single_col(4)  # | grep _rebuild_blknos_and_blklocs
    19870    0.208    0.000    0.529    0.000 managers.py:220(_rebuild_blknos_and_blklocs)  # <- master
    19860    0.108    0.000    0.186    0.000 {method '_rebuild_blknos_and_blklocs' of 'pandas._libs.internals.BlockManager' objects}  # <- PR

@jreback jreback added the Performance Memory or execution speed performance label Sep 1, 2021
@jreback jreback added this to the 1.4 milestone Sep 1, 2021
@jreback jreback merged commit 730f08a into pandas-dev:master Sep 1, 2021
@jbrockmendel jbrockmendel deleted the perf-rebuild branch September 1, 2021 23:40
feefladder pushed a commit to feefladder/pandas that referenced this pull request Sep 7, 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