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

Needs benches #8

Open
workingjubilee opened this issue Sep 9, 2020 · 3 comments
Open

Needs benches #8

workingjubilee opened this issue Sep 9, 2020 · 3 comments

Comments

@workingjubilee
Copy link

This crate features no benchmarks, yet claims to be "fast". Microbenchmarks may not be optimal, but it would be a start. They should also be set up to compare against core: after all, there's a race to win. :^)

@sollyucko
Copy link
Contributor

@workingjubilee
Copy link
Author

Needs more!
( actually surprised I missed that one given that I tried to scan the repository for such a thing, did I just go blind? )

But actually it really does need at least one more. An "interesting" thing about Rust's std is that right now, writing to a Vec often benches as significantly slower even though it is legal to use with write!, and it is of special interest given how many &[u8] buffers Rust features, especially if the goal is to optimize for embedded use (since you're more likely to write to a &[u8] slice than a Vec or String). Possibly due to a bulky write_fmt shim. So, at least that case needs benches.

@Kixunil
Copy link
Owner

Kixunil commented Sep 21, 2020

Sure, would love to see more benchmarks. Unfortunately, I have different priorities these days, but definitely capable of merging PRs if you're interested.

There's also another crate with a similar goal that is a bit closer to std in its API, it's better developed but lacks some features (size hint, not generic over strategy). I don't remember the name, but the author is japaric, so you should be able to find it if it suits you better.

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

3 participants