4 ms·
Yeah, 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
by jrockway 3y ago
Yeah, 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.