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

Switch to rayon-core for faster build #400

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

silvanshade
Copy link
Contributor

This reduces the build time (with --timings) for blake3 from around 1.7s to 1.3s on a Zen4 7950x.

This helps for situations where one is trying to minimize build time (e.g., for build-dependencies).

There seems to be no real downside since the crate doesn't use anything not included in the core rayon crate.

Below I've included the results from cargo build --timings.

The improvement doesn't really show up for b3sum on my system since other dependencies take long enough that it masks the difference. But it's still probably better to switch them both and maybe in some scenario the difference would surface.

b3sum-rayon-core.pdf
b3sum-rayon.pdf
blake3-rayon-core.pdf
blake3-rayon.pdf

@oconnor663
Copy link
Member

Wow yeah, if I do cargo clean && time cargo build on my box, this change brings it down from ~2.0s to ~1.2s. That's a surprisingly big difference. Thanks!

@oconnor663 oconnor663 merged commit 648a060 into BLAKE3-team:master Jul 3, 2024
51 checks passed
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.

2 participants