4 ms·
Interesting, there must be something wrong here. Here is a benchmark using the same commit and default options other than adjusting '--with-openssl=[yes|no]':
by collinfunk 1y ago
Interesting, there must be something wrong here. Here is a benchmark using the same commit and default options other than adjusting '--with-openssl=[yes|no]':
$ dd if=/dev/random of=input bs=1000 count=$(($(echo 10G | numfmt --from=iec) / 1000))
10737418+0 records in
10737418+0 records out
10737418000 bytes (11 GB, 10 GiB) copied, 86.3693 s, 124 MB/s
$ time ./src/sha256sum-libcrypto input
b3e702bb55a109bc73d7ce03c6b4d260c8f2b7f404c8979480c68bc704b64255 input
real 0m16.022s
$ time ./src/sha256sum-nolibcrypto input
b3e702bb55a109bc73d7ce03c6b4d260c8f2b7f404c8979480c68bc704b64255 input
real 0m39.339s
Perhaps there is something wrong with the detection on your system? As in, you do not have this at the end of './configure':
$ grep -F 'HAVE_OPENSSL_' lib/config.h
#define HAVE_OPENSSL_MD5 1
#define HAVE_OPENSSL_MD5_H 1
#define HAVE_OPENSSL_SHA1 1
#define HAVE_OPENSSL_SHA256 1
#define HAVE_OPENSSL_SHA3 1
#define HAVE_OPENSSL_SHA512 1
#define HAVE_OPENSSL_SHA_H 1
- arp242 1y agoSorry, I meant "roughly identical [to my Go program]", not "roughly identical [to the version without OpenSSL]". The ~/verify binary is my little Go program that is ~4 times faster on my Void system, but is of roughly equal performance on the Arch system, to check that coreutils is not slower than Go (when using OpenSSL). Sorry, I probably didn't make that too clear.
- collinfunk 1y agoAh, I should have guessed from the program name. :) I thought I remember Go having pretty optimized assembly for crypto routines. But I have not used the language much. If you have your source code uploaded somewhere I'd be interested to have a look to see what I am missing out on.