-
Couldn't load subscription status.
- Fork 1k
refactor: remove arrow-ord dependency in arrow-cast
#8716
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
base: main
Are you sure you want to change the base?
refactor: remove arrow-ord dependency in arrow-cast
#8716
Conversation
arrow_ordarrow-ord dependency in arrow-cast
|
Could you try running the benchmark in this PR #8710 and see what the difference is? I thought |
a6198b8 to
c72af36
Compare
|
I just reviewed the benchmark in and I think it looks good to go. I'll merge it in and then run the benchmarks on this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| values_indexes.push(0); | ||
| let mut current_data = array.slice(0, 1).to_data(); | ||
| for idx in 1..array.len() { | ||
| let next_data = array.slice(idx, 1).to_data(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is likely to be substantially slower than what partition does, but we can see what the benchmarks show
|
|
||
| // Partition the array to identify runs of consecutive equal values | ||
| let partitions = partition(&[Arc::clone(cast_array)])?; | ||
| let mut run_ends = Vec::new(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, great idea!
Side note: How did you profile this, using samply (it looks like), cargo build --profile profiling, and ran e.g. a unit test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used Instruments that was part of Mac XCode -- it is pretty sweet as it will do whole system profiling (fire it up and start recording and it gathers the info for all processes)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed your suggestion as a PR here: #8716, maybe you can run the benchmark on that too? 😇
|
🤖 |
|
🤖: Benchmark completed Details
|
As @vegarsti predicted, this PR appears to be quite a bit slower than using partition |
70b24d1 to
fe208be
Compare
|
FYI @vegarsti , @alamb After several rounds of optimization, the current version delivers significant improvements over the previous one.
|
|
🤖 |
|
🤖: Benchmark completed Details
|

Which issue does this PR close?
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Existing tests cover this change
Are there any user-facing changes?
No