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

Fix too many heap sorts to improve getNeighborsByHeuristic2 #298

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

Conversation

shengjun1985
Copy link
Contributor

Fix too many heap sorts to improve getNeighborsByHeuristic2

Signed-off-by: shengjun.li shengjun.li@zilliz.com

Signed-off-by: shengjun.li <shengjun.li@zilliz.com>
@shengjun1985
Copy link
Contributor Author

shengjun1985 commented Apr 21, 2021

@yurymalkov
Would you like to review this PR?
I didn't change any calculation logic. I just changed std::vector<std::pair<dist_t, tableint>> return_list to std::vector<tableint> return_list to reduce the times of heap sorting.

Here is the addPoint() performance comparison on my local machine.
cpu: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz * 8
dataset: sift_1M (row count = 1000000, dim = 128, space = L2)

0.5.0 PR-298
M = 16, ef_construction = 200 522411ms 499639ms
M = 16, ef_construction = 100 274406ms 265631ms

@yurymalkov
Copy link
Member

@shengjun1985 It somehow slipped through my attention, sorry. I am going to review it within a few days.
@dyashuni also please review if you have time.

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