From e6aa13bccb7ea5d5b3246b3a944621515905e360 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 29 Jan 2023 10:30:41 +0000 Subject: use Net::SSLeay (OpenSSL) for SHA-(1|256) if installed On my x86-64 machine, OpenSSL SHA-256 is nearly twice as fast as the Digest::SHA implementation from Perl, most likely due to an optimized assembly implementation. SHA-1 is a few percent faster, too. --- lib/PublicInbox/LeiMirror.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/LeiMirror.pm') diff --git a/lib/PublicInbox/LeiMirror.pm b/lib/PublicInbox/LeiMirror.pm index abf66315..31013360 100644 --- a/lib/PublicInbox/LeiMirror.pm +++ b/lib/PublicInbox/LeiMirror.pm @@ -18,7 +18,7 @@ use PublicInbox::Config; use PublicInbox::Inbox; use PublicInbox::LeiCurl; use PublicInbox::OnDestroy; -use Digest::SHA qw(sha256_hex sha1_hex); +use PublicInbox::SHA qw(sha256_hex sha1_hex); use POSIX qw(strftime); our $LIVE; # pid => callback -- cgit v1.2.3-24-ge0c7