Skip to content

Conversation

@wilbertharriman
Copy link

No description provided.

vlasky added a commit to vlasky/sqlite-vec that referenced this pull request Nov 28, 2025
Implements distance_cosine_bit() to calculate cosine similarity for bit
vectors using popcount operations. Previously, cosine distance would error
on binary vectors.

Uses optimized u64 popcount when dimensions are divisible by 64, otherwise
falls back to u8 hamming table lookup.

Merged from upstream PR asg017#212 by wilbertharriman.

Co-Authored-By: Wilbert Harriman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant