Skip to content

Conversation

aplavin
Copy link
Member

@aplavin aplavin commented Mar 17, 2022

Without it, reduce(vcat) seems to fall back to the general reduce with much worse performance.

@piever
Copy link
Collaborator

piever commented Mar 18, 2022

I would have thought this should have worked without overloading anything, but I suspect the problem is a missing similar method. Do you get a fast reduce(vcat, structarrays) if you check out #94 ?

@aplavin
Copy link
Member Author

aplavin commented Mar 18, 2022

Actually, I got somewhat confused: the issue isn't performance, it's that currently reduce(vcat) returns a vector of namedtuples when given a vector of structarrays. And this does get fixed by #94 - a structarray is returned! Any plans to merge that?

@piever
Copy link
Collaborator

piever commented Mar 18, 2022

That got a bit stale, I've rebased and cleaned up in #218. Other than a confusing ambiguity (when OffsetArrays are involved), it should be possible to merge it quickly. Feel free to comment there if you have ideas on the OffsetArrays issue.

@aplavin
Copy link
Member Author

aplavin commented Mar 18, 2022

Thanks for that update! With #218, reduce(vcat, structarrays) properly returns a structarray, and is quite performant - comparable to reduce(vcat, vectors_of_namedtuples), even though somewhat slower.

@aplavin aplavin closed this Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants