-
Notifications
You must be signed in to change notification settings - Fork 78
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
[MRG] Move similarity with abundance into Rust #808
Conversation
Codecov Report
@@ Coverage Diff @@
## master #808 +/- ##
==========================================
- Coverage 79.74% 79.43% -0.31%
==========================================
Files 45 45
Lines 6630 6673 +43
Branches 454 467 +13
==========================================
+ Hits 5287 5301 +14
- Misses 1042 1071 +29
Partials 301 301
Continue to review full report at Codecov.
|
02f73cf
to
c789245
Compare
LGTM! In the future it'd be nice to avoid too many changes to infrastructure code (the workflows and Cargo.toml stuff) along with the other changes... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Fair point... |
Similarity calculations had to call
.merge()
(to check if minhashes are compatible),.get_mins()
(which copies a lot of data) and calculate thedotproduct
in Python, so moving this into Rust makes things... faster. I used sourmash_benchmarks to run a compare test, and for that benchmark (using 380 signatures from the genbank k51 SBT) it takes 30s now (down from 90s in2.3.1
).I also changed
compare
to avoid downsampling a signature if it is already at the right scaled.(Incidentally, also avoids calling
.merge()
and leaking memory 🙈)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?