Keep smaller temp lists in _signatures #840
Merged
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.
Implement suggestion posted in lobste.rs:
Turns out this works great!
set
list
Runtime increase is small (
77s
versus73s
in my tests) and memory consumption is stable (down to1.5GB
again, instead of using1.7GB
as in #826). While this is not a big change for current LCA indices, as they increase in number of signatures in the future this can potentially save quite a bit of memory.Additionally, fix two issues detected during writing of https://blog.luizirber.org/2020/01/10/sourmash-pr/:
hashes_ptr as *mut u64
should have beenhashes_ptr as *const u64
(changing mutability here doesn't matter much, but can be dangerous as code changes in the future)add_many
. Added both time and mem benchmarks for it. (It would also be nice to have an LCA_signatures
benchmark, but that involves more infra).Checklist
make test
Did it pass the tests?make coverage
Is the new code covered?without a major version increment. Changing file formats also requires a
major version number increment.
changes were made?