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

Testing string implementations using real-world code #24

Open
xfbs opened this issue Aug 17, 2023 · 2 comments
Open

Testing string implementations using real-world code #24

xfbs opened this issue Aug 17, 2023 · 2 comments

Comments

@xfbs
Copy link

xfbs commented Aug 17, 2023

Hey!

I'm the author of imstr. I just stumbled across this work and I think it is awesome to get some data on the performance of various string implementations. The more data we have, the better we can choose which approach works best.

One of the reasons I wrote imstr was that I had a specific use-case in mind: parsing data. Specifically, parsing massive XML files, and pulling content into structs in a way that does not need to copy strings around all the time. Basically, the same thing Bytes can do (atomic, reference-counted, slicable buffers).

Which brings me to my question: do you think it would be possible to take some representative real-world code, make it generic so it works with any string implementation, and testing it here? There could be some interesting data lurking. Especially in places like frontend code it is nice to be able to be conservative with memory and copying stuff around.

Since I am quite interested in this, I would be available to help out.

@epage
Copy link
Collaborator

epage commented Aug 17, 2023

My main concern with "real world" code is what use case should we represent?

One benefit to doing it though is it'd be more indicative for having binary size / compile time benchmarks which we currently lack.

@xfbs
Copy link
Author

xfbs commented Aug 29, 2023

That is a good question, indeed.

My initial idea would be to pick say the top n binary crates from crates.io, and see if any of those can be modified to be generic over the string implementation. But I don't imagine that to be too simple :D

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

No branches or pull requests

2 participants