[PATCH] SSE2/SSSE3 optimized version of get_checksum1() for x86-64

Ben RUBSON ben.rubson at gmx.com
Mon May 18 17:39:20 UTC 2020

> On 18 May 2020, at 19:02, Jorrit Jongma <jorrit.jongma+rsync at gmail.com> wrote:
> I think you're missing a point here. Two different checksum algorithms
> are used in concert, the Adler-based one and the MD5 one. I
> SSE-optimized the Adler-based one. The Adler-based hash is used to
> _find_ blocks that might have shifted, while the MD5 hash is a strong
> cryptographic hash used to _verify_ blocks and files. You wouldn't
> want to replace the MD5 hash with the Adler-based hash, they are of a
> different class. If you'd replace the MD5 hash with a different one,
> you'd replace it with one of the SHA's or even xxHash.

Jorrit, I missed that point yes, sorry, thank you for clarifying again...

We would then also need a SSE-version of the MD5 algorithm to have a full hardware / SSE support.
But then, as you said before ; "single stream MD5 cannot be effectively optimized with SSE, at least I've not seen an SSE version faster than pure C".
So, finally, https://bugzilla.samba.org/show_bug.cgi?id=13082 may not be achievable easily, at least it would not improve performance...

Replacing MD5 with a different algorithm would impact both sender and receiver, but yes we may then use a faster (even perhaps hardware-backed) solution.


More information about the rsync mailing list