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

Speed up the substring kernel #1511

Closed
HaoYang670 opened this issue Mar 31, 2022 · 0 comments · Fixed by #1512
Closed

Speed up the substring kernel #1511

HaoYang670 opened this issue Mar 31, 2022 · 0 comments · Fixed by #1512
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog performance

Comments

@HaoYang670
Copy link
Contributor

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
https://github.com/apache/arrow-rs/blob/master/arrow/src/compute/kernels/substring.rs#L44

    let mut new_values = MutableBuffer::new(0); // we have no way to estimate how much this will be.

We can estimate the memory we need by firstly calculating the length of each substring. This can improve the performance because we don't need to reallocate memory when building buffer.

@HaoYang670 HaoYang670 added the enhancement Any new improvement worthy of a entry in the changelog label Mar 31, 2022
@alamb alamb added arrow Changes to the arrow crate performance labels Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog performance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants