Skip to content
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

[C++] Improve FlattenRecursively by making it materialize fewer intermediate array values #41182

Open
ZhangHuiGui opened this issue Apr 13, 2024 · 1 comment

Comments

@ZhangHuiGui
Copy link
Collaborator

ZhangHuiGui commented Apr 13, 2024

Describe the enhancement requested

Improve FlattenRecursively by making it materialize fewer intermediate array values

This function is used to flatten a multi-level nested logical list Arrays.

There are multiple ways to batch the copying of data of deeply-nested lists without allocating a new Array per level.

For instance, if you are flattening a fixed_size_list<fixed_size_list<int32>, 2>, 3> without bitmaps on the internal arrays of values, you can gather blocks containing 2 * 3 32-bit integers from the innermost values array to a pre-allocated destination ArrayData.

Comes from : #41092 (comment)

Component(s)

C++

@felipecrv felipecrv changed the title [C++] Improving FlattenRecursively by making it create intermediate array values [C++] Improve FlattenRecursively by making it materialize fewer intermediate array values Apr 13, 2024
@ZhangHuiGui
Copy link
Collaborator Author

In this task, we can also add a micro-benchmark to ensure that our subsequent optimization is effective.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant