-
Notifications
You must be signed in to change notification settings - Fork 7
Add support for syncmers #20
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
Conversation
1418ee6 to
aef54af
Compare
aef54af to
25239bf
Compare
|
I think we could make a version of |
|
Sure, go ahead |
|
The CI tests are getting quite slow (4-5 min), maybe we should run them in release mode, or make |
|
We could run the current ones in release, and then also run in dbg mode with fewer/smaller inputs (via some cfg(debug-assertions)). But yeah just making those 2 smaller is also fine |
|
Okay, I'll see if I can make these two heavy tests release-only. |
|
Btw, do we also want to support open syncmers? |
|
Oh yes good idea. But even more API surface... 🤔 |
|
We could make a |
|
Yeah just assume it's the middle and assert that the right thing is odd. But some code in the new syncmers.rs file probably needs duplicating. Or maybe collect_syncmersOPEN:boil (at least for internal use?) |
|
Regarding API surface area, I wonder if one could consider these many convenience functions to be primarily the external / FFI interface (e.g. for calling from "C"), and to have the Rust interface migrate toward a more minimal API with a configuration object? In general, when the number of different configurations starts to grow large, having a configuration object (usually constructed via the builder pattern with proper typestate management) seems to be a cleaner solution than letting the number of distinct named functions grow very large. |
|
Yeah, we already have a builder, but I decided to add On builders for synmers, we could add (The benefit of having these things as generics is that we avoid a bunch of codegen for all different variants. Otherwise we'd have to rely on inlining to optimize the other variants away, but surely that's slower? The drawback of course it that generics do make the API slightly more intense, but users won't see most of that.) Would be perfect to have a |
|
I prefer Another option is to use const bitflags, like I did in helicase. This reduces the number of generics (down to a hasher and a u64) but might be confusing for some users. |
|
I'd say bit flags is a bit too much of a change for now |
|
Wait, what do you mean an enum is not supported? |
Fix #19
@imartayan could you have a quick look to see if you're OK with how I added this to the builder API?
still todo to add some tests (will do that now).cc @rchikhi