perf: ANN optimizations - SwissHashSet, AVX2 distance, insert_fast#1147
Open
cave-g-f wants to merge 2 commits into
Open
perf: ANN optimizations - SwissHashSet, AVX2 distance, insert_fast#1147cave-g-f wants to merge 2 commits into
cave-g-f wants to merge 2 commits into
Conversation
added 2 commits
June 11, 2026 10:33
Port hot-path optimizations from parent repo PR 6610806 (commit 844664001): - swiss_hash_set.h: New SSE2/SIMD-optimized Swiss table hash set for uint32_t keys with O(occupied_slots) clear and ~87.5% load factor. Replaces tsl::robin_set for inserted_into_pool_rs. - neighbor.h: Add NeighborMinHeap::insert_fast() with AVX2-accelerated linear scan over a contiguous float distance array (_dist_arr) for faster insertion-point finding. - index.cpp: Refactor iterate_to_fixed_point() to interleave prefetch, distance computation, and immediate insert; remove separate dist_scratch allocation; mark nodes visited and process neighbors under the same shared lock (eliminates redundant lock/unlock). - pq_l2_distance.cpp: AVX2 inner loop for chunk-wise PQ centroid distance computation (8-wide _mm256_fmadd_ps). - scratch.h/.cpp: Switch _inserted_into_pool_rs type to SwissHashSet and skip clear() on empty containers.
v3 artifacts were retired by GitHub on 2024-04-16 and now fail builds. Updates 10 references across 9 workflows and 1 composite action. push-test.yml is intentionally left on @V3 because its upload step uses a non-unique artifact name (`dependencies`) across a 3-entry os matrix, which v4 rejects (each upload requires a unique name). That file needs both a name suffix (e.g. `dependencies-${{ matrix.os }}`) and a version bump together.
|
@cave-g-f please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port hot-path optimizations from parent repo PR 6610806 (commit 844664001):
Reference Issues/PRs
What does this implement/fix? Briefly explain your changes.
Any other comments?