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

Optimize KmerMinHash add_sequence #744

Merged
merged 2 commits into from
Oct 17, 2019
Merged

Optimize KmerMinHash add_sequence #744

merged 2 commits into from
Oct 17, 2019

Conversation

camillescott
Copy link
Contributor

@camillescott camillescott commented Oct 16, 2019

Removes a bunch of unnecessary string copying and adds some "unsafe" methods for hashing and sanity checking which accept C-strings (const char *) instead of std::string.

Note that this makes KmerMinHash::add_sequence volatile: the sequence is no longer passed as const. However, the user-facing interface always makes a copy of the incoming Python str in the Cython layer, so this volatility is discarded.

  • Is it mergeable?
  • make test Did it pass the tests?
  • make coverage Is the new code covered?
  • Did it change the command-line interface? Only additions are allowed
    without a major version increment. Changing file formats also requires a
    major version number increment.
  • Was a spellchecker run on the source code and documentation after
    changes were made?

@codecov
Copy link

codecov bot commented Oct 16, 2019

Codecov Report

Merging #744 into master will decrease coverage by <.01%.
The diff coverage is 95.65%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #744      +/-   ##
==========================================
- Coverage    88.6%   88.59%   -0.01%     
==========================================
  Files          30       30              
  Lines        4722     4727       +5     
  Branches       45       46       +1     
==========================================
+ Hits         4184     4188       +4     
  Misses        536      536              
- Partials        2        3       +1
Impacted Files Coverage Δ
sourmash/kmer_min_hash.hh 98.05% <95.65%> (-0.45%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 118f0be...9db65ff. Read the comment docs.

@camillescott
Copy link
Contributor Author

ready to rumble @luizirber @ctb

Copy link
Contributor

@ctb ctb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ctb ctb merged commit 6ca4406 into master Oct 17, 2019
@ctb ctb deleted the optimization/add_sequence branch October 17, 2019 21:13
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