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

reduce number of allocations #2257

Merged
merged 2 commits into from
Nov 16, 2023
Merged

reduce number of allocations #2257

merged 2 commits into from
Nov 16, 2023

Conversation

PSeitz
Copy link
Contributor

@PSeitz PSeitz commented Nov 15, 2023

Explanation makes up around 75% of all allocations (numbers not perf) when indexing.
It's created during serialization but not called.

  • Make Explanation optional in BM25
  • Avoid allocations when using Explanation

Explanation makes up around 50% of all allocations (numbers not perf).
It's created during serialization but not called.

- Make Explanation optional in BM25
- Avoid allocations when using Explanation
src/query/explanation.rs Outdated Show resolved Hide resolved
@PSeitz PSeitz merged commit 0aae31d into main Nov 16, 2023
4 checks passed
@PSeitz PSeitz deleted the num_allocations branch November 16, 2023 12:47
PSeitz added a commit that referenced this pull request Apr 10, 2024
* reduce number of allocations

Explanation makes up around 50% of all allocations (numbers not perf).
It's created during serialization but not called.

- Make Explanation optional in BM25
- Avoid allocations when using Explanation

* use Cow
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.

None yet

2 participants