1
0
Fork 0
mirror of https://github.com/BLAKE3-team/BLAKE3 synced 2024-05-10 16:56:04 +02:00

replace the 'Differences' section with 'Multithreading'

This commit is contained in:
Jack O'Connor 2021-02-05 17:25:45 -05:00
parent 0c26ed52a8
commit aea29ace2d

View File

@ -259,12 +259,13 @@ example:
gcc -shared -O3 -o libblake3.so blake3.c blake3_dispatch.c blake3_portable.c gcc -shared -O3 -o libblake3.so blake3.c blake3_dispatch.c blake3_portable.c
``` ```
# Differences from the Rust Implementation # Multithreading
The single-threaded Rust and C implementations use the same algorithms, Unlike the Rust implementation, the C implementation doesn't currently support
and their performance is the same if you use the assembly multithreading. A future version of this library could add support by taking an
implementations or if you compile the intrinsics-based implementations optional dependency on OpenMP or similar. Alternatively, we could expose a
with Clang. (Both Clang and rustc are LLVM-based.) lower-level API to allow callers to implement concurrency themselves. The
former would be more convenient and less error-prone, but the latter would give
The C implementation doesn't currently include any multithreading callers the maximum possible amount of control. The best choice here depends on
optimizations. OpenMP support or similar might be added in the future. the specific use case, so if you have a use case for multithreaded hashing in
C, please file a GitHub issue and let us know.