From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 2E75A1F63E for ; Sun, 29 Jan 2023 10:30:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1674988243; bh=6VIp16dwur9BtqDOGHqbClf0GL/K89gF13Hbc25WPPc=; h=From:To:Subject:Date:From; b=uXdAnbx0irV/xTL/IfDdblTFsQCpWM4T9/Zu/tspuK320gNPnLgkrtx+FiMZT7JX9 HOqdbk2su9H4DU2Fp2a8BQIhyQdA0YM55QMNHdhW2+qNojT4XfdlG/BO9FUhHnHfvt n9BBgmnzPnvn0Q820eBgf3XuS3M4DhZJGbyLHmG4= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 0/2] allow OpenSSL SHA-(1|256) use if installed Date: Sun, 29 Jan 2023 10:30:40 +0000 Message-Id: <20230129103042.3240848-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: OpenSSL has platform-specific asm, and the SHA-256 x86-64 implementation is nearly twice as fast as the portable C implementation in Perl5. SHA-1 is a tad faster, too. We still need to use Digest::SHA in a few places for ->clone to to bifurcate state. Eric Wong (2): use Net::SSLeay (OpenSSL) for SHA-(1|256) if installed content_digest_dbg: convert to arrayref and limit to lei MANIFEST | 2 + lib/PublicInbox/ContentDigestDbg.pm | 12 +++--- lib/PublicInbox/ContentHash.pm | 11 +++--- lib/PublicInbox/Fetch.pm | 4 +- lib/PublicInbox/Git.pm | 4 +- lib/PublicInbox/LeiDedupe.pm | 6 +-- lib/PublicInbox/LeiMirror.pm | 2 +- lib/PublicInbox/LeiSavedSearch.pm | 4 +- lib/PublicInbox/LeiSucks.pm | 12 +++--- lib/PublicInbox/Linkify.pm | 2 +- lib/PublicInbox/MID.pm | 8 ++-- lib/PublicInbox/MailDiff.pm | 5 +-- lib/PublicInbox/MdirReader.pm | 4 +- lib/PublicInbox/NNTP.pm | 2 +- lib/PublicInbox/SHA.pm | 58 +++++++++++++++++++++++++++++ lib/PublicInbox/WwwAtomStream.pm | 2 +- t/clone-coderepo.t | 2 +- t/httpd-corner.psgi | 4 +- t/httpd-corner.t | 2 +- t/ipc.t | 6 +-- t/nntpd.t | 4 +- t/sha.t | 25 +++++++++++++ t/www_listing.t | 2 +- xt/git_async_cmp.t | 10 ++--- xt/imapd-validate.t | 5 ++- xt/nntpd-validate.t | 5 ++- 26 files changed, 145 insertions(+), 58 deletions(-) create mode 100644 lib/PublicInbox/SHA.pm create mode 100644 t/sha.t