Subject: Re: [bug#51198] [PATCH] gnu: Add b2sum.

From: Leo Famulari <[email-masked]>
Date: Tue, 26 Oct 2021 19:16:22 -0400

On Wed, Oct 27, 2021 at 12:26:01AM +0200, Nicolò Balzarotti wrote:
> (I'm on an old X200 thinkpad).  Might it be that build is not
> deterministic (and we should disable some optimization)?

As a test, I replaced march=native with march=x86-64.

My benchmark is hashing a ~7GB tree of files [0].

Once the files are cached by the kernel:
"march=native": ~13 seconds
"march=x86-64": ~20 seconds

I wonder if some of the other values of -march are faster...

Or maybe the package could use #:substitutable #f, since b2sum is a very
quick build.

Although BLAKE3 / b3sum [1] is radically faster, b2sum is nice because
it's not in Rust, which is still suboptimal on Guix. With b3sum, my
benchmark takes less than 2 seconds!

[0]
`LC_ALL=C; find "$1" -type f -print0 | sort -z | xargs -0 b2sum | time b2sum`

[1] https://bugs.gnu.org/51289