GithubHelp home page GithubHelp logo

Rust Bindings about stringzilla HOT 15 CLOSED

ashvardanian avatar ashvardanian commented on July 22, 2024
Rust Bindings

from stringzilla.

Comments (15)

ashvardanian avatar ashvardanian commented on July 22, 2024 2

Benchmarks are ready.

from stringzilla.

michaelgrigoryan25 avatar michaelgrigoryan25 commented on July 22, 2024 1

That would work.

from stringzilla.

michaelgrigoryan25 avatar michaelgrigoryan25 commented on July 22, 2024 1

Sure, let's do it right now.

from stringzilla.

michaelgrigoryan25 avatar michaelgrigoryan25 commented on July 22, 2024 1

@ashvardanian definitely, let's do it!

from stringzilla.

ashvardanian avatar ashvardanian commented on July 22, 2024 1

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.

from stringzilla.

michaelgrigoryan25 avatar michaelgrigoryan25 commented on July 22, 2024

@ashvardanian regarding the "fingerprints" in the table that you've shared in the PR, is it the same as sz_hash?

from stringzilla.

ashvardanian avatar ashvardanian commented on July 22, 2024

Not the same, but related. Fingerprints are rolling hashes, which are used to populate a bitset.

from stringzilla.

michaelgrigoryan25 avatar michaelgrigoryan25 commented on July 22, 2024

In that case which is the function for generating fingerprints using StringZilla?

from stringzilla.

ashvardanian avatar ashvardanian commented on July 22, 2024

@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.

from stringzilla.

michaelgrigoryan25 avatar michaelgrigoryan25 commented on July 22, 2024

These are the most commonly used string types in Rust:

  • &str
  • String
  • &String
  • Cow<'_, str>
  • Cow<'_, String>

from stringzilla.

michaelgrigoryan25 avatar michaelgrigoryan25 commented on July 22, 2024

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.

from stringzilla.

ashvardanian avatar ashvardanian commented on July 22, 2024

Sure. How about the AsRef<[u8]> I currently use?

from stringzilla.

michaelgrigoryan25 avatar michaelgrigoryan25 commented on July 22, 2024

@ashvardanian michaelgrigoryan25@4f4ace3

from stringzilla.

ashvardanian avatar ashvardanian commented on July 22, 2024

@michaelgrigoryan25 this looks good! Want to open a PR or want to add a few more things before that?

from stringzilla.

ashvardanian avatar ashvardanian commented on July 22, 2024

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??

from stringzilla.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.