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

Feature: Simd Selection of column filter #4264

Closed
sundy-li opened this issue Feb 27, 2022 · 1 comment · Fixed by #4271
Closed

Feature: Simd Selection of column filter #4264

sundy-li opened this issue Feb 27, 2022 · 1 comment · Fixed by #4271
Assignees
Labels
C-feature Category: feature C-performance Category: Performance community-take good first issue Category: good first issue

Comments

@sundy-li
Copy link
Member

sundy-li commented Feb 27, 2022

Summary

Description for this feature.

Now filter works with memcpy one by one, we can use Vec.extend function to copy a batch of at most 64 items one time.

https://github.com/datafuselabs/databend/blob/dc058c9d22baa9e61763661f77cd10ec62c87c48/common/datavalues/src/columns/primitive/mod.rs#L187-L204

Some useful tools:

  • Bitmap's Chunk function:
impl Bitmap {
    /// Returns an iterator over bits in chunks of `T`, which is useful for
    /// bit operations.
    pub fn chunks<T: BitChunk>(&self) -> BitChunks<T> {
        BitChunks::new(&self.bytes, self.offset, self.length)
    }
}
  • Function: __builtin_ctz
  int __builtin_ctz (unsigned int x)
Returns the number of trailing 0-bits in x, starting at the least significant bit position. If x is 0, the result is undefined.

Rust's https://doc.rust-lang.org/std/primitive.u32.html#method.trailing_zeros

@sundy-li sundy-li added C-feature Category: feature good first issue Category: good first issue C-performance Category: Performance labels Feb 27, 2022
@platoneko
Copy link
Contributor

/assignme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: feature C-performance Category: Performance community-take good first issue Category: good first issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants