Implement native interleave for ListView#9558
Open
vegarsti wants to merge 2 commits intoapache:mainfrom
Open
Conversation
a1131f2 to
16f2287
Compare
Contributor
|
Do you mind comparing this to the fallthrough performance of #9562 ? |
Contributor
Author
Oh for sure, thanks for reminding me! |
Contributor
Author
|
Updated the description with results now. It's not looking like a win..! |
Contributor
|
I would say let's merge the fallthrough and iterate on this version. I'm sure there are several possibilities for optimizations. |
Contributor
|
FWIW I pushed up the branch I've had marinating locally for a month or two in case it's helpful: main...polarsignals:arrow-rs:asubiotto/lvinterleave. I believe the benchmarks showed a slight regression for interleaves of small lists, but overall the perf was an improvement. I'm not able to take a closer look right now, but sharing in case it's helpful. |
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.
Closes #9342.
This PR adds a native implementation of interleave for the ListView type. Also adds a benchmark. Unfortunately this uncovered that the fallback implementation is broken, see the
test_list_view_interleave_fallback_is_brokentest, which panics if we comment out the native implementation:But with the native implementation, the benchmark results are comparable to those for list. I have not been able to make them faster than list for this benchmark.
With a cherry pick of the fix in #9562, we get