Closed genonullfree closed 2 years ago
At a glance, it seems that Blake3 is highly optimized for intel x86, seems sus
Swapping out Blake3 for AHash and FxHash yields the following differences:
Aarch64:
Blake3 == Time: 84.91s Speed: 111.626 Mbps
AHash == Time: 7.82s Speed: 1339.507 Mbps
(~12x faster)
FxHash == Time: 24.37s Speed: 390.689 Mbps
xxHash == Time: 9.61s Speed: 1041.839 Mbps
x86_64:
Blake3 == Time: 1.95s Speed: 5331.465 Mbps
AHash == Time: 9.28s Speed: 592.385 Mbps
(~9x slower)
FxHash == Time: 24.85s Speed: 222.144 Mbps
xxHash == Time: 10.52s Speed: 533.146 Mbps
As sad as those stats are for x86_64, I think it does bring a bit more parity to other architecture speeds....
Maybe it could be optional?
Ok, doing a new comment for the --release
versions (thanks @wcampbell0x2a !)
Aarch64:
Blake3 == Time: 3.14s Speed: 3125.516 Mbps
(current default)
AHash == Time: 252.15ms Speed: inf Mbps
FxHash == Time: 575.60ms Speed: inf Mbps
XXH64 == Time: 254.68ms Speed: inf Mbps
XXH3 == Time: 480.89ms Speed: inf Mbps
x86_64:
Blake3 == Time: 1.08s Speed: 5331.465 Mbps
AHash == Time: 342.29ms Speed: inf Mbps
FxHash == Time: 511.00ms Speed: inf Mbps
XXH64 == Time: 372.59ms Speed: inf Mbps
XXH3 == Time: 318.64ms Speed: inf Mbps
I like how the code gets cleaned up for AHash/FxHash/xxHash, so I'll probably end up merging in AHash, but that'll cause another minor version bump, oops.
If collision ratios of hash functions matters for your application, you might want to have a look at this comparison exercise .
@Cyan4973 Yes it does! I would certainly like my file transfer utility to not have to really worry about hash collisions when possible. Thank you for commenting, your link is a great resource that I missed earlier.
Perform some binary profiling to determine exact case of slowdown.
Affected versions:
v0.6.0
,v0.5.5
, suspect the following culprits:Ex Linux machine orig:
Linux machine delta overwrite:
Ex MacOS machine (M1Max) orig:
MacOS machine (M1Max) delta overwrite: