Skip to content

Speedup filter (up to 1.5x) filter/BitIndexIterator/iter_set_bits_rev #9230

Closed

Description

@Dandandan

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

While working on optimizing push_batch_with_filter, I found some nice optimizations for existing filter code.

Describe the solution you'd like

self.current_chunk ^= 1 << bit_pos could be converted to self.current_chunk &= self.current_chunk - 1 generating fewer instructions.

Describe alternatives you've considered

Additional context

Activity

  1. added
    enhancement
    on Jan 20, 2026
  2. added a commit that references this issue on Jan 20, 2026
    ebace17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions