-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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: DataFrame.transpose with dt64tz #40149
Conversation
@jreback would it help to split off the perf-improving part of this for a follow-up to further trim the diff? |
sure |
hmm this is looking more involved than i expected. Can try if it makes a difference, basically would split off everything in frame.py |
let me look again i think if u can reduce what is added to frame would be good |
broken in as close to half as possible (not that close) in #41082 |
fairly small diff now |
looks fine. can you rebase. pls add a whatsnew note (as this is a non-trivial perf increse). ping on green. |
ping |
thanks! |
Does what it says on the tin:
DatetimeBlock.values
is alwaysDatetimeArray
, anddt64tzblock.shape == dt64tzblock.values
in all cases. SimilarlyTimedeltaBlock.values
is alwaysTimedeltaArray
.Notes:
Things that im not yet fully happy with:
ASVs: run repeatedly (vs master from yesterday) with --record-samples --append-samples so im pretty confident these are stable (but still include some nonsense xref #40066)
IIRC the groupby.GroupByMethods.time_dtype_as_field were heavily influenced by constructor overhead, which motivated #40054. Still need to try out @jorisvandenbossche's suggestion of non-cython optimization there.