Repository navigation
PERF: cascade Series.dt.components for ArrowDtype durations - #66635
Closed
aboderinsamuel wants to merge 1 commit into
Closed
aboderinsamuel wants to merge 1 commit into
aboderinsamuel wants to merge 1 commit into
Conversation
fangchenli
requested changes
Aug 7, 2026
aboderinsamuel
force-pushed
the
perf-63283-dt-components-cascade
branch
from
August 8, 2026 13:04
3d07137 to
e975485
Compare
aboderinsamuel
force-pushed
the
perf-63283-dt-components-cascade
branch
from
August 13, 2026 10:14
e975485 to
9da7eba
Compare
fangchenli
approved these changes
Aug 19, 2026
Member
|
Can you check perf on ser.dt.days? I suspect this is non-trivially slower |
Member
|
Closing as stale. Can reopen when you're ready to address comments and continue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
doc/source/whatsnew/vX.X.X.rstfile.AGENTS.md.Speeds up
Series.dt.componentsforArrowDtypedurations with two changes:%was emulated with divide/multiply/subtract)._dt_daysand_dt_day_remainder, instead of being recomputed on every.dt.componentscall.No behavior change, covered by the existing
test_arrowduration-component tests.Benchmark of
TimedeltaComponents.time_components(duration[ns][pyarrow], best of 60, before = main / after = branch):Series.dt.components34.5 ms -> 18.0 ms (~1.9x) at N=100k all-positive, and 320 ms -> 173 ms (~1.85x) at N=1M mixed-sign. Single-field accessors unchanged.xref #63283, #63470