1
0
Fork 0
mirror of https://github.com/BLAKE3-team/BLAKE3 synced 2024-05-27 04:26:03 +02:00
This commit is contained in:
Dan Zwell 2023-07-22 21:15:49 +08:00 committed by GitHub
commit f81b2e2544
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -196,7 +196,9 @@ impl Input {
// multiple threads. This doesn't work on stdin, or on some files,
// and it can also be disabled with --no-mmap.
Self::Mmap(cursor) => {
hasher.update_rayon(cursor.get_ref());
for chunk in cursor.get_ref().chunks(4_194_304) {
hasher.update_rayon(chunk);
}
}
// The slower paths, for stdin or files we didn't/couldn't mmap.
// This is currently all single-threaded. Doing multi-threaded