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

update readme to better explain rust comparison #2

Merged
merged 2 commits into from
Feb 13, 2020

Conversation

zeebo
Copy link
Owner

@zeebo zeebo commented Feb 12, 2020

I don't want to give the impression that the Rust version is always slow with incremental updates, nor do I want to ignore that internal buffering has no downsides, but I do want to highlight the upsides of having internal buffering.

This should help balance those concerns.

Rendered

I don't want to give the impression that the Rust version is always
slow with incremental updates, nor do I want to ignore that internal
buffering has no downsides, but I do want to highlight the upsides
of having internal buffering.

This should help balance those concerns.
@oconnor663
Copy link

The new writeup looks good. Thanks for putting it together so quickly.

We just released version 0.2.0 of the blake3 crate earlier today. It adds the c Cargo feature, which enables assembly implementations. Any chance you could rerun the benchmarks with that feature enabled? (The blake3 crate itself doesn't enable it by default, because it requires a C compiler. But the b3sum binary crate does enable it by default.)

@zeebo
Copy link
Owner Author

zeebo commented Feb 12, 2020

I don't mind, but can you provide some more details on how to run it? I'm not very familiar with Rust tooling, and have just been doing cargo bench 😄

@oconnor663
Copy link

oconnor663 commented Feb 12, 2020

Any other week, I'd run this at the root of the BLAKE3 repo:

cargo +nightly bench --features=c

However we have some unrelated breakage on nightly at the moment (BLAKE3-team/BLAKE3#57), so what I'm running this week is this:

RUSTC_BOOTSTRAP=1 cargo +stable bench --features=c

It looks like you're defaulting to the nightly Rust channel, so that +stable above will select the stable channel (which you might need to install). RUSTC_BOOTSTRAP=1 is a hack to allow us to run benchmarks on stable (normally nightly is required). And finally --features=c turns on the "c" Cargo feature, which we define in Cargo.toml and then look for in build.rs (and throughout the Rust code) to turn on the assembly implementations.

If you want to filter the benchmarks down to something specific, you can put all or part of the name of the benchmark on the end of the command line there as an extra argument.

@zeebo
Copy link
Owner Author

zeebo commented Feb 13, 2020

Thanks for the information. It looks like it's ~10% faster on my machine, so great work. The charts have been updated.

Time to study the techniques used in that assembly 😄

@zeebo zeebo merged commit 25dba57 into master Feb 13, 2020
@zeebo
Copy link
Owner Author

zeebo commented Feb 13, 2020

Alright, since you said it looked good earlier except for newer benchmarks, and those have been updated, I'm giving this a merge. Thanks!

@zeebo zeebo deleted the readme-benchmark-updates branch February 13, 2020 15:54
@oconnor663
Copy link

Thanks for the information. It looks like it's ~10% faster on my machine, so great work.

All credit goes to @sneves.

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

Successfully merging this pull request may close these issues.

None yet

2 participants