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

Improve performance of set_bits #2060

Closed
viirya opened this issue Jul 13, 2022 · 2 comments · Fixed by #2077
Closed

Improve performance of set_bits #2060

viirya opened this issue Jul 13, 2022 · 2 comments · Fixed by #2077
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog performance

Comments

@viirya
Copy link
Member

viirya commented Jul 13, 2022

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

When profiling a project using arrow-rs, found that set_bits is among one of heavy stack trace:

arrow::compute::kernels::filter::filter_array::h86b56436bac43c26	
arrow::compute::kernels::filter::filter_dict::hb507a878026da337	
arrow::compute::kernels::filter::filter_primitive::he8bd6ecc432914a3	
arrow::compute::kernels::filter::filter_null_mask::h4636cf4ec7ac3797	
arrow::compute::kernels::filter::filter_bits::hba752c56f552d45f	
arrow::array::builder::boolean_buffer_builder::BooleanBufferBuilder::append_packed_range::hd58d43f1c7f97d22	
arrow::util::bit_mask::set_bits::hdf6751951c8784f2	

It's good if we can improve it.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@viirya viirya added the enhancement Any new improvement worthy of a entry in the changelog label Jul 13, 2022
@tustvold
Copy link
Contributor

It might be possible to rework the algorithm to use UnalignedBitChunkIterator instead, which may perform better

@viirya
Copy link
Member Author

viirya commented Jul 14, 2022

Thanks @tustvold. I will take a look on UnalignedBitChunkIterator too.

@alamb alamb added arrow Changes to the arrow crate performance labels Jul 21, 2022
@alamb alamb changed the title Improve performance of set_bits Improve performance of set_bits Jul 21, 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
3 participants