Closed michaelgrigoryan25 closed 6 months ago
@ashvardanian regarding the "fingerprints" in the table that you've shared in the PR, is it the same as sz_hash?
Not the same, but related. Fingerprints are rolling hashes, which are used to populate a bitset.
In that case which is the function for generating fingerprints using StringZilla?
@michaelgrigoryan25, it's called sz_fingerprint_rolling 🤗
I am not sure about what's the best Rust interface for it should look like, so let's keep it for the end.
These are the most commonly used string types in Rust:
&str
String
&String
Cow<'_, str>
Cow<'_, String>
These are the most commonly used string types in Rust:
&str
String
&String
Cow<'_, str>
Cow<'_, String>
I can implement a macro which implements a common trait for all these types, so that methods like sz_find
can be accessed directly, by only importing the trait via use
.
Sure. How about the AsRef<[u8]>
I currently use?
That would work.
@michaelgrigoryan25 this looks good! Want to open a PR or want to add a few more things before that?
Sure, let's do it right now.
Thanks a lot, great patches, @michaelgrigoryan25! In C++ I've implemented lazy-evaluated convenience functions, like find_all
, rfind_all
, split_all
, rsplit_all
, and so on. Took around 400 lines of code. I think it might be a great idea to implement them in Rust as well. What do you think? Would you be interested in adding those and the Levenshtein / Needleman-Wunsch alignment scores??
@ashvardanian definitely, let's do it!
As mentioned in #79, I am not sure about the right course of action here. The other operations, like #82 or random string generation might be more relevant. We should also benchmark against memchr and other native Rust string projects.
Continuation of #66.