3 ms·
> Blake3 is 17 times faster! (Blake2b, a fast and more-trusted hash than blake3, is about 6x faster.) I'm a little surprised to see that 6x figure. Just going
by oconnor663 3y ago
> Blake3 is 17 times faster! (Blake2b, a fast and more-trusted hash than blake3, is about 6x faster.)
I'm a little surprised to see that 6x figure. Just going off the red bar chart at blake2.net, I wouldn't expect to see much more than a 2x difference, unless you're measuring a sub-optimal SHA256 implementation. And recent x86 CPUs have hardware acceleration for SHA256, which makes it faster than BLAKE2b. But those CPUs also have wide vector registers and lots of cores, so BLAKE3's relative advantage tends to grow even as BLAKE2b falls behind.
But in any case, yes, builds and containers tend to be great use cases for BLAKE3. You've got big files that are getting hashed over and over, and they're likely to be in cache. An expensive AWS machine can hit crazy numbers like 100 GB/s on that sort of workload, where the bottleneck ends up being memory bandwidth rather than CPU speed.
- jrockway 3y agoYeah, I'm not using any special implementation of sha256. Just crypto/sha256 from the standard library. It's also worth noting that I'm testing on a zen2 chip. I have read a lot of papers saying that sha2 is much faster because CPUs have special support; didn't see it in practice. (No AVX-512 here, but I believe those algorithms predate AVX-512 anyway.)
- saltcured 3y agoThe normal sha256sum CLI program in Fedora Linux seems to use these extensions. On a couple older Intel x86_64 systems without the extension, I get around 300 MiB/s hashing a ~15 MB file. On a Ryzen 3700u laptop I get around 1250 MiB/s. And I also get around 1380 MiB/s on an an aarch64 ARM vCPU on AWS (t4g instance type).
- jiggawatts 3y agoIt’s included with the AES-NI instruction set, which is quite old now and included on most computers.