Skip to content

GraphLinks::for_each_link#5490

Merged
xzfc merged 1 commit intodevfrom
links-comp-for_each_link
Nov 26, 2024
Merged

GraphLinks::for_each_link#5490
xzfc merged 1 commit intodevfrom
links-comp-for_each_link

Conversation

@xzfc
Copy link
Member

@xzfc xzfc commented Nov 20, 2024

This PR slightly updates the GraphLinks trait:

  • Removed: fn links(); it was iter()-like, i.e. returns an iterator.
  • Added instead: fn for_each_link(); it's for_each()-like, i.e. takes a closure.
  • Also, added #[cfg(test)] fn links_vec(); returns a vector. Obliviously, it's slow, but it used only in tests.

The reason is that it would be easier for a compiler to generate inline-able code. (and the the subsequent PRs depend on this change)

@xzfc xzfc added this to the hnsw-links-compression milestone Nov 20, 2024
@xzfc xzfc merged commit 5c24d63 into dev Nov 26, 2024
@xzfc xzfc deleted the links-comp-for_each_link branch November 26, 2024 21:35
coszio pushed a commit that referenced this pull request Dec 2, 2024
timvisee pushed a commit that referenced this pull request Dec 9, 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

Successfully merging this pull request may close these issues.

2 participants