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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ std = []
# `update_rayon` and (in combination with `mmap` below) `update_mmap_rayon`
# methods, for multithreaded hashing. However, even if this feature is enabled,
# all other APIs remain single-threaded.
rayon = ["dep:rayon", "std"]
rayon = ["dep:rayon-core", "std"]

# The `mmap` feature (disabled by default, but enabled for docs.rs) adds the
# `update_mmap` and (in combination with `rayon` above) `update_mmap_rayon`
Expand Down Expand Up @@ -98,7 +98,7 @@ constant_time_eq = "0.3.0"
cfg-if = "1.0.0"
digest = { version = "0.10.1", features = [ "mac" ], optional = true }
memmap2 = { version = "0.9", optional = true }
rayon = { version = "1.2.1", optional = true }
rayon-core = { version = "1.12.1", optional = true }
serde = { version = "1.0", default-features = false, features = ["derive"], optional = true }
zeroize = { version = "1", default-features = false, features = ["zeroize_derive"], optional = true }

Expand Down
20 changes: 2 additions & 18 deletions b3sum/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion b3sum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ anyhow = "1.0.25"
blake3 = { version = "1", path = "..", features = ["mmap", "rayon"] }
clap = { version = "4.0.8", features = ["derive", "wrap_help"] }
hex = "0.4.0"
rayon = "1.2.1"
rayon-core = "1.12.1"
wild = "2.0.3"

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion b3sum/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ fn check_one_checkfile(path: &Path, args: &Args, files_failed: &mut u64) -> Resu

fn main() -> Result<()> {
let args = Args::parse()?;
let mut thread_pool_builder = rayon::ThreadPoolBuilder::new();
let mut thread_pool_builder = rayon_core::ThreadPoolBuilder::new();
if let Some(num_threads) = args.num_threads() {
thread_pool_builder = thread_pool_builder.num_threads(num_threads);
}
Expand Down
2 changes: 1 addition & 1 deletion src/join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl Join for RayonJoin {
RA: Send,
RB: Send,
{
rayon::join(oper_a, oper_b)
rayon_core::join(oper_a, oper_b)
}
}

Expand Down