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

Labels are 64bit but JS bindings were limited to 32bit #43

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

asilvas
Copy link
Contributor

@asilvas asilvas commented Sep 24, 2023

An important change for large indexes, and precursor to supporting vector identifiers where index is insufficient. Faiss already natively uses 64bit labels, this PR just prevents the conversion loss.

* @return {number} number of IDs removed.
*/
removeIds(ids: number[]): number
removeIds(ids: BigInt[]): number
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function was already implemented correctly but had invalid type notation.

@asilvas
Copy link
Contributor Author

asilvas commented Sep 29, 2023

Let me know if you prefer these small PR's or one bigger one. Have quite a few improvements planned.

@ewfian
Copy link
Owner

ewfian commented Sep 30, 2023

Let me know if you prefer these small PR's or one bigger one. Have quite a few improvements planned.

Thank you very much for your series of improvements. Small PR's are preferred

@ewfian
Copy link
Owner

ewfian commented Oct 2, 2023

@asilvas Thank you for this pr, but considering the following points, I would like to put this pr aside. Maybe we can provide another API to deal with 64bit issues in the future.

  1. This modification will brings break changes and cause great trouble to downstream users.
  2. Number and BigInt are not interoperable. Generally, users are more familiar with number, and using number will have better compatibility with other libraries.
  3. Generally speaking, if a user uses javascript, I do not expect him to have sufficient requirements for performance and data volume.

@asilvas
Copy link
Contributor Author

asilvas commented Oct 2, 2023

If you're not interested in serious improvements you can close my PR's and I'll move to fork.

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.

2 participants