Skip to content

PERF: _form_blocks #43144

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 5 commits into from
Aug 23, 2021
Merged

PERF: _form_blocks #43144

merged 5 commits into from
Aug 23, 2021

Conversation

jbrockmendel
Copy link
Member

@jbrockmendel jbrockmendel commented Aug 21, 2021

from asv_bench.benchmarks.frame_ctor import *

self = FromArrays()

self.setup()

%timeit self.time_frame_from_arrays_int()
2.28 ms ± 67 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)  # <- master
1.82 ms ± 5.34 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)  # <- PR

Orthogonal to #43142, one more optimization after these two are in.

@jreback jreback added Internals Related to non-user accessible pandas implementation Performance Memory or execution speed performance labels Aug 21, 2021
@jreback jreback added this to the 1.4 milestone Aug 21, 2021
@jreback
Copy link
Contributor

jreback commented Aug 21, 2021

@jbrockmendel
Copy link
Member Author

Huh can't reproduce the failures locally, will have to dig into this

@jbrockmendel
Copy link
Member Author

OK, looks like in numpy<1.21 comparing np.dtype object to EA dtype object raises instead of returning False, so the itertools.groupby is failing. will figure out a workaround

@jbrockmendel
Copy link
Member Author

updated with np<1.21-compatiblity + green

@jbrockmendel
Copy link
Member Author

@jreback gentle ping; hoping to get this in before you take off

items_dict: DefaultDict[str, list] = defaultdict(list)

for i, name_idx in enumerate(range(len(arrays))):
def _grouping_func(tup):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if u can type in a follow on

@jreback jreback merged commit 5600a2f into pandas-dev:master Aug 23, 2021
@jbrockmendel jbrockmendel deleted the perf-form_blocks-4 branch August 23, 2021 01:47
@jbrockmendel jbrockmendel mentioned this pull request Aug 23, 2021
4 tasks
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
Internals Related to non-user accessible pandas implementation Performance Memory or execution speed performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants