Skip to content

Commit

Permalink
Enabled Rayon multithreading
Browse files Browse the repository at this point in the history
  • Loading branch information
Stridsvagn69420 committed Jun 25, 2023
1 parent 9bb9cec commit 586a137
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 5 deletions.
3 changes: 0 additions & 3 deletions .vscode/settings.json

This file was deleted.

118 changes: 118 additions & 0 deletions 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ exclude = [
]

[dependencies]
blake3 = "1.4"
blake3 = { version = "1.4", features = ["rayon"] }
kagero = { version = "0.4", default-features = false, features = ["printer"] }

[profile.release]
Expand Down
2 changes: 1 addition & 1 deletion src/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub(crate) fn hasher(path: &Path) -> io::Result<Hash> {
if bytes_read == 0 {
break;
}
hasher.update(&buffer[..bytes_read]);
hasher.update_rayon(&buffer[..bytes_read]);
};
Ok(hasher.finalize())
}
Expand Down

0 comments on commit 586a137

Please sign in to comment.