The SHA1 replacement plan
Joerg Sonnenberger
joerg at bec.de
Tue Jul 28 19:35:51 UTC 2020
On Tue, Jul 28, 2020 at 03:02:46PM -0400, Josef 'Jeff' Sipek wrote:
> On Sun, Jul 26, 2020 at 18:26:51 +0200, Joerg Sonnenberger wrote:
> ...
> > I've attached basic benchmark numbers below. The asm variant is using
> > whatever my Threadripper supports in terms of low-level primitives, e.g.
> > AVX2 and the SHA extension, either from OpenSSL (BLAKE2, SHA2, SHA3) or
> > the reference implementations (K12, BLAKE3, BLAKE3*). Test case was
> > hashing a large file (~7GB).
>
> While these performance measurements are important, it is also important to
> make sure that older (or less "top of the line") hardware isn't completely
> terrible. For example, it is completely reasonable (at least IMO) to still
> use a Sandy Bridge-era CPUs. Likewise, it is reasonable to run hg on a
> embedded system (although those tend to have wimpy I/O as well).
Yeah, that's why I included the C variant. Those are essentially
straight forward implementations used in pkgsrc's digest tool. Ideally,
we can pick a function that not too much worse than SHA1. Just to
establish that baseline:
SHA1 (asm) 4.8s
SHA1 (C) 10.7s
So K12 is somewhat slower on a Threadripper, but should be somewhat
faster than hardware without specific acceleration. SHA support on the
Zen1 Threadripper is quite fast.
Joerg
More information about the Mercurial-devel
mailing list