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

Embedding generation is slow due to inefficient search #6

Closed
Bhuvan-21 opened this issue Jun 11, 2024 · 1 comment
Closed

Embedding generation is slow due to inefficient search #6

Bhuvan-21 opened this issue Jun 11, 2024 · 1 comment

Comments

@Bhuvan-21
Copy link

In the emb_generate.py file, for every index, the program checks whether it is in the existing list of indices here

if idx in exisiting_indices:
    continue

This operation is O(n) where n is the length of existing indices, this can be easily avoided by converting this list into a set before starting the loop. This is a minor change, hopefully the authors can take care of this in the next commit.

exisiting_indices = set(exisiting_indices)
@Wuyxin
Copy link
Collaborator

Wuyxin commented Aug 14, 2024

@Wuyxin Wuyxin closed this as completed Aug 14, 2024
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

No branches or pull requests

2 participants