Jack O'Connor <oconnor...@gmail.com> added the comment:

Ok, I've added Rust bindings to the BLAKE3 C implementation, so that I can 
benchmark it in a vaguely consistent way. My laptop is an i5-8250U, which 
should be very similar to yours. (Both are "Kaby Lake Refresh".) My end result 
do look similar to yours with TurboBoost on, but pretty different with 
TurboBoost off:

with TurboBoost on
------------------
K12 GCC        | 2159 MB/s
BLAKE3 Rust    | 1787 MB/s
BLAKE3 C Clang | 1588 MB/s
BLAKE3 C GCC   | 1453 MB/s

with TurboBoost off
-------------------
BLAKE3 Rust    | 1288 MB/s
K12 GCC        | 1060 MB/s
BLAKE3 C Clang | 1094 MB/s
BLAKE3 C GCC   |  943 MB/s

The difference seems to be that with TurboBoost on, the BLAKE3 benchmarks have 
my CPU sitting around 2.4 GHz, while for the K12 benchmarks it's more like 2.9 
GHz. With TurboBoost off, both benchmarks run at 1.6 GHz, and BLAKE3 does 
better. I'm not sure what causes that frequency difference. Perhaps some 
high-power instruction that the BLAKE3 implementation is emitting?

To reproduce these numbers you can clone these two repos (the latter is where I 
happen to have a K12 benchmark):

https://github.com/BLAKE3-team/BLAKE3
https://github.com/oconnor663/blake2_simd

Then in both cases checkout the "bench_406668786" branch, where I've put some 
benchmarks with the same input length you used.

For Rust BLAKE3, at the root of the BLAKE3 repo, run: cargo +nightly bench 
406668786

For C BLAKE3, the command is the same, but run it in the 
"./c/blake3_c_rust_bindings" directory. The build defaults to GCC, and you can 
"export CC=clang" to switch it.

For my K12 benchmark, at the root of the blake2_simd repo, run: cargo +nightly 
bench --features=kangarootwelve 406668786

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39298>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to