-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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
PERF: concat perf #23362
Comments
Based on my testing it seems this unfortunately isn't |
With #23404 we're down to 2x slower In [4]: %timeit x._concat_same_type([x, y])
...:
99.8 µs ± 2.25 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)
In [5]: %timeit pd.concat([s, t], ignore_index=True, copy=False)
...:
...:
194 µs ± 3.98 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) I looked very briefly at the snakeviz profile after that was merged. A decent chunk of it was in creating an Index. That's necessarily going to slow |
The difference on 1.2 master is 10x, although it looks like that's because of a significant (10x) improvement in In [2]: %timeit x._concat_same_type([x, y])
9.53 µs ± 29.5 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)
In [3]: %timeit pd.concat([s, t], ignore_index=True)
100 µs ± 2.59 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) |
For
Series[period]
,pd.concat
is about 6x slower thanPeriodArray._concat_same_type
. There's always going to be some overhead, but I wonder how much we can narrow this.The text was updated successfully, but these errors were encountered: