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
Reduce memory of concat kernel #347
Comments
@ritchie46 is this closed in your eyes by #348? |
I think we can apply the same logic to arrays with child data.
come to mind. |
I agree that it would be great to have a method to specify all capacities. The required capacity is usually dependent on the problem over which In this context, a way to address this is to allow something like MutableArrayData::with_capacities(capacities: Capacities);
enum Capacities {
Binary(usize, Option<usize>), // Binary, Utf8
List(usize, Option<Box<Capacities>>),
...
} and let This gives users the freedom to pass other capacities. |
The
concat
kernel concats multiple arrays to contiguous memory. It has the potential to only allocate the required memory. However for (large)-utf8 and for (large)-list it does not do so and relies on exponential allocation to get the required memory.Precomputing the needed capacity of buffers would be faster and less memory heavy.
The text was updated successfully, but these errors were encountered: