Switch to rayon-core for faster build #400
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This reduces the build time (with
--timings
) forblake3
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